Commit 70851335 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Re: per_cpu data question

  I suck.  Lvalues continue to haunt me.  This works for me.

  BTW, I prefer to have bug reports cc'd to linux-kernel, so the
  results are archived.  Plus, public humiliation is good for the
  soul.
parent db2787b4
......@@ -3,7 +3,8 @@
#include <linux/spinlock.h> /* For preempt_disable() */
#include <asm/percpu.h>
#define get_cpu_var(var) ({ preempt_disable(); __get_cpu_var(var); })
/* Must be an lvalue. */
#define get_cpu_var(var) (*({ preempt_disable(); &__get_cpu_var(var); }))
#define put_cpu_var(var) preempt_enable()
#endif /* __LINUX_PERCPU_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment