1 /* 2 * Copyright 2003-2006, Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Axel Dörfler <axeld@pinc-software.de> 7 * Ingo Weinhold <bonefish@cs.tu-berlin.de> 8 * Johannes Wischert <johanneswi@gmail.com> 9 */ 10 #ifndef _KERNEL_ARCH_ARM_THREAD_H 11 #define _KERNEL_ARCH_ARM_THREAD_H 12 13 #include <arch/cpu.h> 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 void arm_push_iframe(struct iframe_stack *stack, struct iframe *frame); 20 void arm_pop_iframe(struct iframe_stack *stack); 21 struct iframe *arm_get_user_iframe(void); 22 23 /* TODO fix this global once we support SMP ARM... */ 24 extern Thread *gCurrentThread; 25 26 extern inline Thread * 27 arch_thread_get_current_thread(void) 28 { 29 return gCurrentThread; 30 } 31 32 33 extern inline void 34 arch_thread_set_current_thread(Thread *t) 35 { 36 gCurrentThread = t; 37 } 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 44 #endif /* _KERNEL_ARCH_ARM_THREAD_H */ 45