zephyr/include/arch/syscall.h
Carlo Caione 6978160427 aarch64: userspace: Introduce arch_is_user_context
The arch_is_user_context() function is relying on the content of the
tpidrro_el0 register to determine whether we are in user context or not.

This register is set to '1' when in EL1 and set back to '0' when user
threads are running in userspace.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-03-10 14:52:50 -05:00

29 lines
695 B
C

/* syscall.h - automatically selects the correct syscall.h file to include */
/*
* Copyright (c) 1997-2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_ARCH_SYSCALL_H_
#define ZEPHYR_INCLUDE_ARCH_SYSCALL_H_
#if defined(CONFIG_X86)
#if defined(CONFIG_X86_64)
#include <arch/x86/intel64/syscall.h>
#else
#include <arch/x86/ia32/syscall.h>
#endif
#elif defined(CONFIG_ARM64)
#include <arch/arm/aarch64/syscall.h>
#elif defined(CONFIG_ARM)
#include <arch/arm/aarch32/syscall.h>
#elif defined(CONFIG_ARC)
#include <arch/arc/syscall.h>
#elif defined(CONFIG_RISCV)
#include <arch/riscv/syscall.h>
#endif
#endif /* ZEPHYR_INCLUDE_ARCH_SYSCALL_H_ */