From: Peter Zijlstra <peterz@infradead.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] timer: implement lockdep deadlock detection
Date: Thu, 29 Jan 2009 14:38:07 +0100 [thread overview]
Message-ID: <1233236287.4495.77.camel@laptop> (raw)
In-Reply-To: <1233166017.4811.9.camel@johannes.local>
On Wed, 2009-01-28 at 19:06 +0100, Johannes Berg wrote:
> +/*
> + * All the indirection here is required to build the
> + * "<file>:<line>" string and the pointer to it.
> + */
> +#define ___TIMER_INITIALIZER(_fn, _exp, _dat, _kn) \
> + ____TIMER_INITIALIZER(_fn, _exp, _dat, (_kn), &(_kn))
> +#define __TIMER_INITIALIZER(_fn, _exp, _dat, _f, _c, _l) \
> + ___TIMER_INITIALIZER(_fn, _exp, _dat, _f # _c # _l)
> +#define _TIMER_INITIALIZER(_fn, _exp, _dat, _f, _l) \
> + __TIMER_INITIALIZER(_fn, _exp, _dat, _f, :, _l)
> +#define TIMER_INITIALIZER(_function, _expires, _data) \
> + _TIMER_INITIALIZER(_function, _expires, _data, __FILE__, __LINE__)
The regular way to write that would be:
#define __STR(foo) #foo
#define STR(foo) __STR(foo)
__FILE__ ":" STR(__LINE__)
I'm sure I saw that stringify thing somewhere in the kernel before, but
can't find it. I recently added it to lockdep.c, maybe we should add it
to kernel.h ?
next prev parent reply other threads:[~2009-01-29 13:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-26 22:59 [PATCH] timer: implement lockdep deadlock detection Johannes Berg
2009-01-26 23:03 ` Johannes Berg
2009-01-26 23:07 ` Ingo Molnar
2009-01-27 8:45 ` Johannes Berg
2009-01-27 8:46 ` [PATCH v2] " Johannes Berg
2009-01-27 13:27 ` Ingo Molnar
2009-01-27 13:41 ` Ingo Molnar
2009-01-27 18:06 ` Johannes Berg
2009-01-27 18:30 ` Peter Zijlstra
2009-01-27 18:33 ` Johannes Berg
2009-01-27 18:57 ` [PATCH v3] " Johannes Berg
2009-01-28 8:20 ` Peter Zijlstra
2009-01-28 9:54 ` Johannes Berg
2009-01-28 10:13 ` Peter Zijlstra
2009-01-28 10:54 ` Johannes Berg
2009-01-28 18:06 ` Johannes Berg
2009-01-29 12:38 ` Ingo Molnar
2009-01-29 15:03 ` [PATCH v4] " Johannes Berg
2009-01-29 13:38 ` Peter Zijlstra [this message]
2009-01-29 13:44 ` [PATCH v3] " Arnd Bergmann
2009-01-29 14:25 ` Johannes Berg
2009-01-27 18:12 ` [PATCH v2] " Johannes Berg
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1233236287.4495.77.camel@laptop \
--to=peterz@infradead.org \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox