Re: [PATCH] sched: Assign !p->on_cpu to the second parameter of smp_cond_load_acquire()
From: Peter Zijlstra
Date: Fri Jul 01 2016 - 04:40:50 EST
On Fri, Jul 01, 2016 at 11:08:01AM +0800, T.Zhou wrote:
> - smp_cond_load_acquire(&p->on_cpu, !VAL);
> + smp_cond_load_acquire(&p->on_cpu, !p->on_cpu);
Huh, what?! No, the second parameter should very much include VAL, which
gets assigned the value of *(&p->on_cpu).
Go read the macro, it even has a comment on.