xref: /haiku/headers/private/kernel/arch/arm/arch_thread.h (revision b6b0567fbd186f8ce8a0c90bdc7a7b5b4c649678)
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 /* as we won't support SMP on arm (yet?) we can use a global here */
24 /*TODO SMP-ARMS are comming..*/
25 extern struct thread *gCurrentThread;
26 
27 extern inline struct thread *
28 arch_thread_get_current_thread(void)
29 {
30 	return gCurrentThread;
31 }
32 
33 
34 extern inline void
35 arch_thread_set_current_thread(struct thread *t)
36 {
37 	gCurrentThread = t;
38 }
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 
45 #endif /* _KERNEL_ARCH_ARM_THREAD_H */
46