1/*
2 * Copyright 2003-2019, 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 * 		Adrien Destugues <pulkomandy@pulkomandy.tk>
9 */
10#ifndef _KERNEL_ARCH_SPARC_THREAD_H
11#define _KERNEL_ARCH_SPARC_THREAD_H
12
13#include <arch/cpu.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19void ppc_push_iframe(struct iframe_stack *stack, struct iframe *frame);
20void ppc_pop_iframe(struct iframe_stack *stack);
21struct iframe *ppc_get_user_iframe(void);
22
23
24static inline Thread *
25arch_thread_get_current_thread(void)
26{
27    Thread *t;
28    //asm volatile("mfsprg2 %0" : "=r"(t));
29	t = NULL;
30    return t;
31}
32
33
34static inline void
35arch_thread_set_current_thread(Thread *t)
36{
37    //asm volatile("mtsprg2 %0" : : "r"(t));
38}
39
40
41#ifdef __cplusplus
42}
43#endif
44
45
46#endif /* _KERNEL_ARCH_SPARC_THREAD_H */
47
48