From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755224Ab1HZVHZ (ORCPT ); Fri, 26 Aug 2011 17:07:25 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:35037 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754149Ab1HZVHY (ORCPT ); Fri, 26 Aug 2011 17:07:24 -0400 Date: Fri, 26 Aug 2011 14:06:10 -0700 From: Andrew Morton To: Lucas De Marchi Cc: Greg KH , Kay Sievers , Alan Cox , linux-kernel@vger.kernel.org, Nick Piggin , Al Viro , Christoph Hellwig , Stephen Rothwell , David Howells , "Serge E. Hallyn" , Daniel Lezcano , Jiri Slaby , James Morris , neilb@suse.de Subject: Re: [PATCH] sysctl: add support for poll() Message-Id: <20110826140610.c4d27e1a.akpm@linux-foundation.org> In-Reply-To: <1312484238-1645-1-git-send-email-lucas.demarchi@profusion.mobi> References: <1312484238-1645-1-git-send-email-lucas.demarchi@profusion.mobi> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Aug 2011 15:57:18 -0300 Lucas De Marchi 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.