tests: userspace: work around x86_64 bug
Exceptions on x86_64 are incorrectly implemented, and if a preemptible thread faults, and in its overridden k_sys_fatal_error_handler() does something which invokes a scheduling point (such as here where we give semaphores), the thread will be swapped out on the per-CPU exception stack and probably explode when it is switched back in. For now, change the faulting thread priority to co-op so this doesn't happen. Workaround for #21462 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
777213c0fb
commit
6f25384e7a
1 changed files with 1 additions and 1 deletions
|
@ -787,7 +787,7 @@ static void spawn_user(void)
|
|||
|
||||
k_thread_create(&kthread_thread, kthread_stack, STACKSIZE,
|
||||
user_ctx_switch_half, NULL, NULL, NULL,
|
||||
K_PRIO_PREEMPT(1), K_INHERIT_PERMS | K_USER,
|
||||
-1, K_INHERIT_PERMS | K_USER,
|
||||
K_NO_WAIT);
|
||||
|
||||
k_sem_take(&uthread_end_sem, K_FOREVER);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue