* Frederic Weisbecker <fweis...@gmail.com> wrote:

> On Tue, Jul 31, 2012 at 09:06:40AM +0200, Ingo Molnar wrote:
> > 
> > * Frederic Weisbecker <fweis...@gmail.com> wrote:
> > 
> > > On Mon, Jul 30, 2012 at 05:08:12PM +0200, Peter Zijlstra wrote:
> > > > On Fri, 2012-07-27 at 17:40 +0200, Frederic Weisbecker wrote:
> > > > > +++ b/kernel/user_hooks.c
> > > > > @@ -0,0 +1,56 @@
> > > > > +#include <linux/user_hooks.h>
> > > > > +#include <linux/rcupdate.h>
> > > > > +#include <linux/sched.h>
> > > > > +#include <linux/percpu.h>
> > > > > +
> > > > > +struct user_hooks {
> > > > > +       bool hooking;
> > > > > +       bool in_user;
> > > > > +};
> > > > 
> > > > I really detest using bool in structures.. but that's just me. Also this
> > > > really wants a comment as to wtf 'hooking' means. in_user I can just
> > > > about guess.
> > > 
> > > I really don't mind changing that to int. I just like them as 
> > > bool because they better describe the purpose of the field.
> > > 
> > > hooking means that the hooks are set (the TIF flag is set on 
> > > the current task and we also handle the exception hooks).
> > > 
> > > I can call that is_hooking instead? And/or add a comment to 
> > > explain the purpose of this.
> > 
> > Please don't use this horrible naming - use something more 
> > technical like struct user_callback and callback::active, ok?
> 
> Ok, user callback should be fine. I'll respin with that.

One problem I have with the word 'hook' is that it's rarely 
clear whether it's used as a noun or a verb - and the naming in 
your patch shows that kind of confusion in action.

'callback', while a longer word, is almost always used as a noun 
within the kernel - and it also has a pretty narrow meaning.

Thanks,

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to