Skip to content

Commit 8a22624

Browse files
edersondisouzanashif
authored andcommitted
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>
1 parent 62b19ef commit 8a22624

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

arch/arm/core/cortex_a_r/thread.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515

1616
#include <zephyr/kernel.h>
17+
#include <zephyr/llext/symbol.h>
1718
#include <ksched.h>
1819
#include <zephyr/sys/barrier.h>
1920
#include <stdbool.h>
@@ -247,7 +248,7 @@ bool z_arm_thread_is_in_user_mode(void)
247248
value = __get_CPSR();
248249
return ((value & CPSR_M_Msk) == CPSR_M_USR);
249250
}
250-
251+
EXPORT_SYMBOL(z_arm_thread_is_in_user_mode);
251252
#endif
252253

253254
#if defined(CONFIG_MPU_STACK_GUARD) || defined(CONFIG_USERSPACE)

arch/arm/core/cortex_m/thread.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515

1616
#include <zephyr/kernel.h>
17+
#include <zephyr/llext/symbol.h>
1718
#include <ksched.h>
1819
#include <zephyr/sys/barrier.h>
1920
#include <stdbool.h>
@@ -277,6 +278,7 @@ bool z_arm_thread_is_in_user_mode(void)
277278
value = __get_CONTROL();
278279
return (value & CONTROL_nPRIV_Msk) != 0;
279280
}
281+
EXPORT_SYMBOL(z_arm_thread_is_in_user_mode);
280282
#endif
281283

282284
#if defined(CONFIG_BUILTIN_STACK_GUARD)

0 commit comments

Comments
 (0)