Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
asm-offsets.c File Reference
#include <linux/sched.h>
#include <asm/thread_info.h>

Go to the source code of this file.

Macros

#define DEFINE(sym, val)   asm volatile("\n->" #sym " %0 " #val : : "i" (val))
 
#define BLANK()   asm volatile("\n->" : : )
 
#define ENTRY(entry)   DEFINE(PT_ ## entry, offsetof(struct pt_regs, entry))
 
#define ENTRY(entry)   DEFINE(TI_ ## entry, offsetof(struct thread_info, entry))
 
#define ENTRY(entry)   DEFINE(THREAD_ ## entry, offsetof(struct thread_struct, entry))
 
#define ENTRY(entry)   DEFINE(TASK_ ## entry, offsetof(struct task_struct, entry))
 

Functions

int main (void)
 

Macro Definition Documentation

#define BLANK ( )    asm volatile("\n->" : : )

Definition at line 13 of file asm-offsets.c.

#define DEFINE (   sym,
  val 
)    asm volatile("\n->" #sym " %0 " #val : : "i" (val))

Definition at line 10 of file asm-offsets.c.

#define ENTRY (   entry)    DEFINE(PT_ ## entry, offsetof(struct pt_regs, entry))
#define ENTRY (   entry)    DEFINE(TI_ ## entry, offsetof(struct thread_info, entry))
#define ENTRY (   entry)    DEFINE(THREAD_ ## entry, offsetof(struct thread_struct, entry))
#define ENTRY (   entry)    DEFINE(TASK_ ## entry, offsetof(struct task_struct, entry))

Function Documentation

int main ( void  )

Definition at line 19 of file asm-offsets.c.