LWN.net Logo

Re: [PATCH 1/3] kernel.h: Add DO_ONCE statement expression macro

From:  Al Viro <viro-AT-ZenIV.linux.org.uk>
To:  Joe Perches <joe-AT-perches.com>
Subject:  Re: [PATCH 1/3] kernel.h: Add DO_ONCE statement expression macro
Date:  Fri, 22 May 2009 01:27:18 +0100
Message-ID:  <20090522002717.GV8633@ZenIV.linux.org.uk>
Cc:  linux-kernel-AT-vger.kernel.org, cpufreq-AT-vger.kernel.org, Dave Jones <davej-AT-redhat.com>, Greg Kroah-Hartman <gregkh-AT-suse.de>, "H. Peter Anvin" <hpa-AT-zytor.com>, Ingo Molnar <mingo-AT-redhat.com>, x86-AT-vger.kernel.org, Len Brown <len.brown-AT-intel.com>, Mike Travis <travis-AT-sgi.com>, Rusty Russell <rusty-AT-rustcorp.com.au>, Thomas Gleixner <tglx-AT-linutronix.de>, Venkatesh Pallipadi <venkatesh.pallipadi-AT-intel.com>
Archive-link:  Article, Thread

On Thu, May 21, 2009 at 04:00:22PM -0700, Joe Perches wrote:
> Add a DO_ONCE statement expression analogous to printk_once
> that executes any arbitrary statement exactly once.
> 
> This will take the place of printk_once so that
> DO_ONCE(pr_<foo>) or any other statement performed
> a single time may be easily written.

Interesting, how telling somebody that they need to learn C is considered
an unacceptable thing to do.  Hostile to newbies, or some such.  Introducing
more magic that has to be learnt if one wants to read the kernel source, OTOH,
is just fine...


(Log in to post comments)

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds