Messages in this thread | | | Date | Mon, 29 Nov 2010 10:08:59 -0600 (CST) | From | Christoph Lameter <> | Subject | Re: [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.
| |