[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20110826140610.c4d27e1a.akpm@linux-foundation.org>
Date: Fri, 26 Aug 2011 14:06:10 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Lucas De Marchi <lucas.demarchi@...fusion.mobi>
Cc: Greg KH <gregkh@...e.de>, Kay Sievers <kay.sievers@...y.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
linux-kernel@...r.kernel.org, Nick Piggin <npiggin@...nel.dk>,
Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@....de>,
Stephen Rothwell <sfr@...b.auug.org.au>,
David Howells <dhowells@...hat.com>,
"Serge E. Hallyn" <serge.hallyn@...onical.com>,
Daniel Lezcano <daniel.lezcano@...e.fr>,
Jiri Slaby <jslaby@...e.cz>, James Morris <jmorris@...ei.org>,
neilb@...e.de
Subject: Re: [PATCH] sysctl: add support for poll()
On Thu, 4 Aug 2011 15:57:18 -0300
Lucas De Marchi <lucas.demarchi@...fusion.mobi> wrote:
> Adding support for poll() in sysctl fs allows userspace to receive
> notifications of changes in sysctl entries. This adds a infrastructure
> to allow files in sysctl fs to be pollable and implements it for
> hostname and domainname.
>
Seems reasonable. One slight nit:
> +#define __CTL_TABLE_POLL_INITIALIZER(name) { \
> + .event = ATOMIC_INIT(0), \
> + .wait = __WAIT_QUEUE_HEAD_INITIALIZER(name.wait) }
> +
> +#define DECLARE_CTL_TABLE_POLL(name) \
> + struct ctl_table_poll name = __CTL_TABLE_POLL_INITIALIZER(name)
This macro is used to define an instance of ctl_table_poll. Hence it
should be called DEFINE_CTL_TABLE_POLL, not DECLARE_*.
declaration: "one of these exists"
definition: "here it is".
This matters a bit, because sometimes we'll have separate macros for
declaring and defining.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists