home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / src / linux-headers-2.6.17-6 / include / asm-x86_64 / current.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-08-11  |  434 b   |  28 lines

  1. #ifndef _X86_64_CURRENT_H
  2. #define _X86_64_CURRENT_H
  3.  
  4. #if !defined(__ASSEMBLY__) 
  5. struct task_struct;
  6.  
  7. #include <asm/pda.h>
  8.  
  9. static inline struct task_struct *get_current(void) 
  10.     struct task_struct *t = read_pda(pcurrent); 
  11.     return t;
  12.  
  13. #define current get_current()
  14.  
  15. #else
  16.  
  17. #ifndef ASM_OFFSET_H
  18. #include <asm/asm-offsets.h> 
  19. #endif
  20.  
  21. #define GET_CURRENT(reg) movq %gs:(pda_pcurrent),reg
  22.  
  23. #endif
  24.  
  25. #endif /* !(_X86_64_CURRENT_H) */
  26.