kernel: thread: do not assert on tests

remove assert that prevented us from testing non-userspace code on
platforms that can do userspace.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2021-02-22 10:25:52 -05:00
parent f4ad56ee8b
commit ecdc770c9b

View file

@ -654,13 +654,6 @@ k_tid_t z_impl_k_thread_create(struct k_thread *new_thread,
{
__ASSERT(!arch_is_in_isr(), "Threads may not be created in ISRs");
/* Special case, only for unit tests */
#if defined(CONFIG_TEST) && defined(CONFIG_ARCH_HAS_USERSPACE) && !defined(CONFIG_USERSPACE)
__ASSERT((options & K_USER) == 0,
"Platform is capable of user mode, and test thread created with K_USER option,"
" but neither CONFIG_TEST_USERSPACE nor CONFIG_USERSPACE is set\n");
#endif
z_setup_new_thread(new_thread, stack, stack_size, entry, p1, p2, p3,
prio, options, NULL);