/arch/xtensa/include/asm/current.h

http://github.com/mirrors/linux · C Header · 38 lines · 17 code · 12 blank · 9 comment · 0 complexity · df40b59078f5090ac1f57963f881e4fa MD5 · raw file

  1. /*
  2. * include/asm-xtensa/current.h
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 2001 - 2005 Tensilica Inc.
  9. */
  10. #ifndef _XTENSA_CURRENT_H
  11. #define _XTENSA_CURRENT_H
  12. #include <asm/thread_info.h>
  13. #ifndef __ASSEMBLY__
  14. #include <linux/thread_info.h>
  15. struct task_struct;
  16. static inline struct task_struct *get_current(void)
  17. {
  18. return current_thread_info()->task;
  19. }
  20. #define current get_current()
  21. #else
  22. #define GET_CURRENT(reg,sp) \
  23. GET_THREAD_INFO(reg,sp); \
  24. l32i reg, reg, TI_TASK \
  25. #endif
  26. #endif /* XTENSA_CURRENT_H */