LKML Archive on
help / color / mirror / Atom feed
From: Joe Perches <>
To: Pavel Emelyanov <>
Cc: Andrew Morton <>,
	Alexey Dobriyan <>,
	Linux Containers <>,,
	Linux Kernel Mailing List <>,
	Sukadev Bhattiprolu <>,
	Oleg Nesterov <>
Subject: Re: [PATCH] Use helpers to obtain task pid in printks (arch code)
Date: Mon, 27 Aug 2007 11:01:48 -0700	[thread overview]
Message-ID: <1188237708.18004.102.camel@localhost> (raw)
In-Reply-To: <>

On Mon, 2007-08-27 at 11:30 +0400, Pavel Emelyanov wrote:
> From: Alexey Dobriyan <>
> One of the easiest things to isolate is the pid printed in kernel
> log. There was a patch, that made this for arch-independent code,
> this one makes so for arch/xxx files.

Perhaps it would be worthwhile to standardize the printk
task information content? Maybe a format knob?


#define TASK_FMT "%s"
#define TASK_ARG(tsk) ({char __buf[MAX_TASK_INFO]; print_task(tsk, buf, sizeof(__buf)); __buf})

char* print_task(const struct task_struct* tsk, char* buf, size_t size)
	char* p = buf;
	int task_knob = get_task_knob();
	*p++ = '[';
	if (task_knob & feature)
		p += snprintf(p, size - (p - buf), fmt, feature);
	*p++ = ']';
	return buf;

  reply	other threads:[~2007-08-27 18:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27  7:30 Pavel Emelyanov
2007-08-27 18:01 ` Joe Perches [this message]
2007-08-30 19:11   ` Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1188237708.18004.102.camel@localhost \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] Use helpers to obtain task pid in printks (arch code)' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).