haiku/headers/private/kernel/arch/arm64/arch_thread.h
David Karoly a0c8f15f33 kernel/arm64: implement iframe stack and unwinding
Change-Id: I1587c1f57bd73777a188bb8f1bc58263de82fcb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5684
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-23 13:56:16 +00:00

38 lines
731 B
C

/*
* Copyright 2022, Haiku Inc. All rights reserved.
* Copyright 2018, Jaroslaw Pelczar <jarek@jpelczar.com>
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_ARM64_ARCH_THREAD_H_
#define _KERNEL_ARCH_ARM64_ARCH_THREAD_H_
#include <arch/cpu.h>
#ifdef __cplusplus
extern "C" {
#endif
void arm64_push_iframe(struct iframe_stack *stack, struct iframe *frame);
void arm64_pop_iframe(struct iframe_stack *stack);
static inline Thread * arch_thread_get_current_thread(void)
{
return (Thread *)READ_SPECIALREG(tpidr_el1);
}
static inline void arch_thread_set_current_thread(Thread *t)
{
WRITE_SPECIALREG(tpidr_el1, t);
}
#ifdef __cplusplus
}
#endif
#endif /* _KERNEL_ARCH_ARM64_ARCH_THREAD_H_ */