Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
kernel-offsets.h
Go to the documentation of this file.
1 #include <linux/stddef.h>
2 #include <linux/sched.h>
3 #include <linux/elf.h>
4 #include <linux/crypto.h>
5 #include <asm/mman.h>
6 
7 #define DEFINE(sym, val) \
8  asm volatile("\n->" #sym " %0 " #val : : "i" (val))
9 
10 #define BLANK() asm volatile("\n->" : : )
11 
12 #define OFFSET(sym, str, mem) \
13  DEFINE(sym, offsetof(struct str, mem));
14 
15 void foo(void)
16 {
17 #include <common-offsets.h>
18 }