X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=ndk%2Fandroid-ndk-r4%2Fdarwin%2Fplatforms%2Fandroid-8%2Farch-x86%2Fusr%2Finclude%2Flinux%2Fpercpu.h;fp=ndk%2Fandroid-ndk-r4%2Fdarwin%2Fplatforms%2Fandroid-8%2Farch-x86%2Fusr%2Finclude%2Flinux%2Fpercpu.h;h=c19561662705aacd5f05953beba87a8ccfdf6129;hb=72eddb87bfc38a2f6fae40566ec6380eb838489a;hp=0000000000000000000000000000000000000000;hpb=e19e12d257815bef7bfe4f3d81056a5b2464c464;p=android-x86%2Fprebuilt.git diff --git a/ndk/android-ndk-r4/darwin/platforms/android-8/arch-x86/usr/include/linux/percpu.h b/ndk/android-ndk-r4/darwin/platforms/android-8/arch-x86/usr/include/linux/percpu.h new file mode 100644 index 0000000..c195616 --- /dev/null +++ b/ndk/android-ndk-r4/darwin/platforms/android-8/arch-x86/usr/include/linux/percpu.h @@ -0,0 +1,30 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + **************************************************************************** + ****************************************************************************/ +#ifndef __LINUX_PERCPU_H +#define __LINUX_PERCPU_H +#include +#include +#include +#include +#include + +#ifndef PERCPU_ENOUGH_ROOM +#define PERCPU_ENOUGH_ROOM 32768 +#endif + +#define get_cpu_var(var) (*({ preempt_disable(); &__get_cpu_var(var); })) +#define put_cpu_var(var) preempt_enable() + +#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) + +#define alloc_percpu(type) ((type *)(__alloc_percpu(sizeof(type)))) +#endif