blob: 3ea01a1a88c2b2adcbb475ca3f609586c2758831 [file] [log] [blame]
Matthew Wilcox7ad3d4d2016-12-16 11:55:56 -05001#define DECLARE_PER_CPU(type, val) extern type val
Matthew Wilcox1366c372016-03-17 14:21:45 -07002#define DEFINE_PER_CPU(type, val) type val
3
4#define __get_cpu_var(var) var
5#define this_cpu_ptr(var) var
Matthew Wilcox7ad3d4d2016-12-16 11:55:56 -05006#define this_cpu_read(var) var
7#define this_cpu_xchg(var, val) uatomic_xchg(&var, val)
8#define this_cpu_cmpxchg(var, old, new) uatomic_cmpxchg(&var, old, new)
Matthew Wilcox1366c372016-03-17 14:21:45 -07009#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); })
10#define per_cpu(var, cpu) (*per_cpu_ptr(&(var), cpu))