current.h 541 B

1234567891011121314151617181920212223242526272829
  1. #ifndef _M68K_CURRENT_H
  2. #define _M68K_CURRENT_H
  3. #ifdef CONFIG_MMU
  4. register struct task_struct *current __asm__("%a2");
  5. #else
  6. /*
  7. * Rather than dedicate a register (as the m68k source does), we
  8. * just keep a global, we should probably just change it all to be
  9. * current and lose _current_task.
  10. */
  11. #include <linux/thread_info.h>
  12. struct task_struct;
  13. static inline struct task_struct *get_current(void)
  14. {
  15. return(current_thread_info()->task);
  16. }
  17. #define current get_current()
  18. #endif /* CONFNIG_MMU */
  19. #endif /* !(_M68K_CURRENT_H) */