current.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:0k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. #ifndef _PARISC_CURRENT_H
  2. #define _PARISC_CURRENT_H
  3. #include <asm/processor.h>
  4. struct task_struct;
  5. static inline struct task_struct * get_current(void)
  6. {
  7. register unsigned long cr;
  8. __asm__ __volatile__("mfctl %%cr30,%0" : "=r" (cr) );
  9. return (struct task_struct *)cr;
  10. }
  11.  
  12. #define current get_current()
  13. #endif /* !(_PARISC_CURRENT_H) */