arch/arm/core: Export z_arm_thread_is_in_user_mode for extensions

This call is used by syscalls machinery, and needs to be available for
extensions that use syscalls on ARM.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This commit is contained in:
Ederson de Souza 2024-03-22 16:47:58 -07:00 committed by Anas Nashif
parent 62b19ef65c
commit 8a2262431f
2 changed files with 4 additions and 1 deletions

View file

@ -14,6 +14,7 @@
*/
#include <zephyr/kernel.h>
#include <zephyr/llext/symbol.h>
#include <ksched.h>
#include <zephyr/sys/barrier.h>
#include <stdbool.h>
@ -247,7 +248,7 @@ bool z_arm_thread_is_in_user_mode(void)
value = __get_CPSR();
return ((value & CPSR_M_Msk) == CPSR_M_USR);
}
EXPORT_SYMBOL(z_arm_thread_is_in_user_mode);
#endif
#if defined(CONFIG_MPU_STACK_GUARD) || defined(CONFIG_USERSPACE)

View file

@ -14,6 +14,7 @@
*/
#include <zephyr/kernel.h>
#include <zephyr/llext/symbol.h>
#include <ksched.h>
#include <zephyr/sys/barrier.h>
#include <stdbool.h>
@ -277,6 +278,7 @@ bool z_arm_thread_is_in_user_mode(void)
value = __get_CONTROL();
return (value & CONTROL_nPRIV_Msk) != 0;
}
EXPORT_SYMBOL(z_arm_thread_is_in_user_mode);
#endif
#if defined(CONFIG_BUILTIN_STACK_GUARD)