current.h 675 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. #ifndef __ASSEMBLY__
  13. #include <linux/thread_info.h>
  14. struct task_struct;
  15. static inline struct task_struct *get_current(void)
  16. {
  17. return current_thread_info()->task;
  18. }
  19. #define current get_current()
  20. #else
  21. #define CURRENT_SHIFT 13
  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 */