current.h 435 B

123456789101112131415161718192021
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_PARISC_CURRENT_H
  3. #define _ASM_PARISC_CURRENT_H
  4. #ifndef __ASSEMBLY__
  5. struct task_struct;
  6. static __always_inline struct task_struct *get_current(void)
  7. {
  8. struct task_struct *ts;
  9. /* do not use mfctl() macro as it is marked volatile */
  10. asm( "mfctl %%cr30,%0" : "=r" (ts) );
  11. return ts;
  12. }
  13. #define current get_current()
  14. #endif /* __ASSEMBLY__ */
  15. #endif /* _ASM_PARISC_CURRENT_H */