lkml.org 
[lkml]   [2010]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [thisops uV2 03/10] percpu: Generic support for this_cpu_add,sub,dec,inc_return
    On Sat, 27 Nov 2010, Mathieu Desnoyers wrote:

    > >
    > > +#define __pcpu_size_call_return2(stem, variable, ...) \
    > > +({ typeof(variable) pscr_ret__; \
    >
    > isn't it usual to do ?
    >
    > ( { \
    > typeof(variable) pscr_ret__; \
    >
    > instead ?

    Not in macros like this as far as I can tell but I can change it.

    > > + switch(sizeof(variable)) { \
    > > + case 1: pscr_ret__ = stem##1(variable, __VA_ARGS__);break; \
    >
    > ;break; at the EOL seems a bit odd. Maybe moving it to the next line ?

    Again this seems to be common in macros like this.

    >
    > > + preempt_disable(); \
    > > + __this_cpu_add((pcp), val); \
    >
    > Hrm, you are inconsistent between your macros. Here you use "(pcp), " but above:
    > "(variable, ". I think the extra () are not needed in this case, so you might
    > want to consider removing these from (pcp).

    Hmmm... I will try to straighten that out.



    \
     
     \ /
      Last update: 2010-11-29 17:11    [W:4.098 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site