current.h 740 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. register unsigned long current_stack_pointer __asm__("a1");
  22. #else
  23. #define GET_CURRENT(reg,sp) \
  24. GET_THREAD_INFO(reg,sp); \
  25. l32i reg, reg, TI_TASK \
  26. #endif
  27. #endif /* XTENSA_CURRENT_H */