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