Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #define DECLARE_PER_CPU(type, val) extern type val
0003 #define DEFINE_PER_CPU(type, val) type val
0004 
0005 #define __get_cpu_var(var)  var
0006 #define this_cpu_ptr(var)   var
0007 #define this_cpu_read(var)  var
0008 #define this_cpu_xchg(var, val)     uatomic_xchg(&var, val)
0009 #define this_cpu_cmpxchg(var, old, new) uatomic_cmpxchg(&var, old, new)
0010 #define per_cpu_ptr(ptr, cpu)   ({ (void)(cpu); (ptr); })
0011 #define per_cpu(var, cpu)   (*per_cpu_ptr(&(var), cpu))