1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef __LINUX_PERCPU_H
13#define __LINUX_PERCPU_H
14#include <linux/spinlock.h>
15#include <linux/slab.h>
16#include <linux/smp.h>
17#include <linux/string.h>
18#include <asm/percpu.h>
19
20#ifndef PERCPU_ENOUGH_ROOM
21#define PERCPU_ENOUGH_ROOM 32768
22#endif
23
24#define get_cpu_var(var) (*({ preempt_disable(); &__get_cpu_var(var); }))
25#define put_cpu_var(var) preempt_enable()
26
27#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); })
28
29#define alloc_percpu(type) ((type *)(__alloc_percpu(sizeof(type))))
30#endif
31