arch: arm: add initial support for CONFIG_USERSPACE
add related configs & (stub) functions for enabling CONFIG_USERSPACE on arm w/o build errors. Signed-off-by: Chunlin Han <chunlin.han@linaro.org>
This commit is contained in:
parent
68b459ec41
commit
95d28e53bb
4 changed files with 111 additions and 0 deletions
|
@ -526,7 +526,18 @@ static inline struct k_thread *_unpend_first_thread(_wait_q_t *wait_q)
|
|||
*/
|
||||
static inline int _is_thread_user(void)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_HAS_CUSTOM_SWAP_TO_MAIN
|
||||
/* the _current might be NULL before the first thread is scheduled if
|
||||
* CONFIG_ARCH_HAS_CUSTOM_SWAP_TO_MAIN is enabled.
|
||||
*/
|
||||
if (!_current) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return _current->base.user_options & K_USER;
|
||||
#else
|
||||
return _current->base.user_options & K_USER;
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
#endif /* _ksched__h_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue