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