From 85eb3bb0fb1deff8e6651c85bbec52b444d22cfb Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Thu, 27 Sep 2018 19:50:06 -0700 Subject: [PATCH] kernel: remove single thread support This removes single thread supports. Changes are done to remove CONFIG_MULTITHREADING and #ifdef enclosed by it. This includes the following reverts which can be trivially applied: Revert "drivers: flash: w25qxxdv: Avoid locking when not threaded" This reverts commit 392da5baee6c5779214580c81b025af8766225fb. Revert "drivers: flash: nrf: Avoid locking when not threaded" This reverts commit 408ea1464b254972f00469cad4f23c078c2857d4. Revert "tests/kernel/threads/no-multithreading: Disable USERSPACE" This reverts commit 2f95e2400f84f38eca04601f20f4fdc189febd1e. Revert "tests/kernel: Add a test for CONFIG_MULTITHREADING=n" This reverts commit 7bbd3a79ae04f75d084a29afedf5cd921bc4746b. Revert "kernel: Final spin in !MULTITHREADING should be locked" This reverts commit 8daafd4fbafb17b7f1033e7129528fde90f7560c. Revert "kernel: Restore CONFIG_MULTITHREADING=n behavior" This reverts commit 3d14615f56c8be48033e2b79b4b990da6783ddff. Revert "ext: simplelink: host driver: depend on multithreading" This reverts commit 4d912b004b6997e4312a903c85a3c75e2e24d7ca. Relates to #9808 Signed-off-by: Daniel Leung --- arch/Kconfig | 1 - drivers/flash/soc_flash_nrf.c | 23 ++++--------- drivers/flash/spi_flash_w25qxxdv.c | 34 +++++++------------ drivers/flash/spi_flash_w25qxxdv.h | 2 -- ext/hal/ti/simplelink/Kconfig | 1 - include/kernel.h | 7 ---- kernel/Kconfig | 19 ++--------- kernel/include/ksched.h | 5 --- kernel/init.c | 16 --------- kernel/sched.c | 2 -- kernel/thread.c | 8 ----- lib/thread_entry.c | 6 ---- samples/mpu/mpu_test/prj_single.conf | 1 - subsys/logging/Kconfig | 1 - subsys/shell/Kconfig | 4 +-- subsys/shell/shell.c | 22 +++--------- subsys/shell/shell_log_backend.c | 6 ++-- .../threads/no-multithreading/CMakeLists.txt | 6 ---- .../kernel/threads/no-multithreading/prj.conf | 12 ------- .../threads/no-multithreading/src/main.c | 20 ----------- .../threads/no-multithreading/testcase.yaml | 8 ----- 21 files changed, 29 insertions(+), 175 deletions(-) delete mode 100644 samples/mpu/mpu_test/prj_single.conf delete mode 100644 tests/kernel/threads/no-multithreading/CMakeLists.txt delete mode 100644 tests/kernel/threads/no-multithreading/prj.conf delete mode 100644 tests/kernel/threads/no-multithreading/src/main.c delete mode 100644 tests/kernel/threads/no-multithreading/testcase.yaml diff --git a/arch/Kconfig b/arch/Kconfig index aaa6ec1937dc35..29627ffc5f29d5 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -126,7 +126,6 @@ config DYNAMIC_OBJECTS config SIMPLE_FATAL_ERROR_HANDLER bool "Simple system fatal error handler" - default y if !MULTITHREADING help Provides an implementation of _SysFatalErrorHandler() that hard hangs instead of aborting the faulting thread, and does not print anything, diff --git a/drivers/flash/soc_flash_nrf.c b/drivers/flash/soc_flash_nrf.c index 0fdd3c516e1098..7b1fa4c089541f 100644 --- a/drivers/flash/soc_flash_nrf.c +++ b/drivers/flash/soc_flash_nrf.c @@ -65,17 +65,8 @@ static int erase_op(void *context); /* instance of flash_op_handler_t */ static int erase_in_timeslice(u32_t addr, u32_t size); #endif /* CONFIG_SOC_FLASH_NRF_RADIO_SYNC */ -#if defined(CONFIG_MULTITHREADING) /* semaphore for locking flash resources (tickers) */ static struct k_sem sem_lock; -#define SYNC_INIT() k_sem_init(&sem_lock, 1, 1) -#define SYNC_LOCK() k_sem_take(&sem_lock, K_FOREVER) -#define SYNC_UNLOCK() k_sem_give(&sem_lock) -#else -#define SYNC_INIT() -#define SYNC_LOCK() -#define SYNC_UNLOCK() -#endif static int write(off_t addr, const void *data, size_t len); static int erase(u32_t addr, u32_t size); @@ -131,7 +122,7 @@ static int flash_nrf_write(struct device *dev, off_t addr, return 0; } - SYNC_LOCK(); + k_sem_take(&sem_lock, K_FOREVER); #if defined(CONFIG_SOC_FLASH_NRF_RADIO_SYNC) if (ticker_is_initialized(0)) { @@ -142,7 +133,7 @@ static int flash_nrf_write(struct device *dev, off_t addr, ret = write(addr, data, len); } - SYNC_UNLOCK(); + k_sem_give(&sem_lock); return ret; } @@ -166,7 +157,7 @@ static int flash_nrf_erase(struct device *dev, off_t addr, size_t size) return 0; } - SYNC_LOCK(); + k_sem_take(&sem_lock, K_FOREVER); #if defined(CONFIG_SOC_FLASH_NRF_RADIO_SYNC) if (ticker_is_initialized(0)) { @@ -177,14 +168,14 @@ static int flash_nrf_erase(struct device *dev, off_t addr, size_t size) ret = erase(addr, size); } - SYNC_UNLOCK(); + k_sem_give(&sem_lock); return ret; } static int flash_nrf_write_protection(struct device *dev, bool enable) { - SYNC_LOCK(); + k_sem_take(&sem_lock, K_FOREVER); if (enable) { NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos; @@ -193,7 +184,7 @@ static int flash_nrf_write_protection(struct device *dev, bool enable) } nvmc_wait_ready(); - SYNC_UNLOCK(); + k_sem_give(&sem_lock); return 0; } @@ -225,7 +216,7 @@ static int nrf_flash_init(struct device *dev) { dev->driver_api = &flash_nrf_api; - SYNC_INIT(); + k_sem_init(&sem_lock, 1, 1); #if defined(CONFIG_SOC_FLASH_NRF_RADIO_SYNC) k_sem_init(&sem_sync, 0, 1); diff --git a/drivers/flash/spi_flash_w25qxxdv.c b/drivers/flash/spi_flash_w25qxxdv.c index 2a1f8ad6f19efc..b8f402003cc6b1 100644 --- a/drivers/flash/spi_flash_w25qxxdv.c +++ b/drivers/flash/spi_flash_w25qxxdv.c @@ -14,17 +14,6 @@ #include "spi_flash_w25qxxdv.h" #include "flash_priv.h" -#if defined(CONFIG_MULTITHREADING) -#define SYNC_INIT() k_sem_init( \ - &((struct spi_flash_data *)dev->driver_data)->sem, 1, UINT_MAX) -#define SYNC_LOCK() k_sem_take(&driver_data->sem, K_FOREVER) -#define SYNC_UNLOCK() k_sem_give(&driver_data->sem) -#else -#define SYNC_INIT() -#define SYNC_LOCK() -#define SYNC_UNLOCK() -#endif - static int spi_flash_wb_access(struct spi_flash_data *ctx, u8_t cmd, bool addressed, off_t offset, void *data, size_t length, bool write) @@ -134,14 +123,14 @@ static int spi_flash_wb_read(struct device *dev, off_t offset, void *data, return -ENODEV; } - SYNC_LOCK(); + k_sem_take(&driver_data->sem, K_FOREVER); wait_for_flash_idle(dev); ret = spi_flash_wb_access(driver_data, W25QXXDV_CMD_READ, true, offset, data, len, false); - SYNC_UNLOCK(); + k_sem_give(&driver_data->sem); return ret; } @@ -157,13 +146,13 @@ static int spi_flash_wb_write(struct device *dev, off_t offset, return -ENOTSUP; } - SYNC_LOCK(); + k_sem_take(&driver_data->sem, K_FOREVER); wait_for_flash_idle(dev); reg = spi_flash_wb_reg_read(dev, W25QXXDV_CMD_RDSR); if (!(reg & W25QXXDV_WEL_BIT)) { - SYNC_UNLOCK(); + k_sem_give(&driver_data->sem); return -EIO; } @@ -176,7 +165,7 @@ static int spi_flash_wb_write(struct device *dev, off_t offset, ret = spi_flash_wb_access(driver_data, W25QXXDV_CMD_PP, true, offset, (void *)data, len, true); - SYNC_UNLOCK(); + k_sem_give(&driver_data->sem); return ret; } @@ -187,7 +176,7 @@ static int spi_flash_wb_write_protection_set(struct device *dev, bool enable) u8_t reg = 0; int ret; - SYNC_LOCK(); + k_sem_take(&driver_data->sem, K_FOREVER); wait_for_flash_idle(dev); @@ -199,7 +188,7 @@ static int spi_flash_wb_write_protection_set(struct device *dev, bool enable) ret = spi_flash_wb_reg_write(dev, reg); - SYNC_UNLOCK(); + k_sem_give(&driver_data->sem); return ret; } @@ -263,12 +252,12 @@ static int spi_flash_wb_erase(struct device *dev, off_t offset, size_t size) return -ENODEV; } - SYNC_LOCK(); + k_sem_take(&driver_data->sem, K_FOREVER); reg = spi_flash_wb_reg_read(dev, W25QXXDV_CMD_RDSR); if (!(reg & W25QXXDV_WEL_BIT)) { - SYNC_UNLOCK(); + k_sem_give(&driver_data->sem); return -EIO; } @@ -303,7 +292,7 @@ static int spi_flash_wb_erase(struct device *dev, off_t offset, size_t size) } } - SYNC_UNLOCK(); + k_sem_give(&driver_data->sem); return ret; } @@ -351,9 +340,10 @@ static int spi_flash_wb_configure(struct device *dev) static int spi_flash_init(struct device *dev) { + struct spi_flash_data *data = dev->driver_data; int ret; - SYNC_INIT(); + k_sem_init(&data->sem, 1, UINT_MAX); ret = spi_flash_wb_configure(dev); if (!ret) { diff --git a/drivers/flash/spi_flash_w25qxxdv.h b/drivers/flash/spi_flash_w25qxxdv.h index e8485b5af40ddb..5b86ed590912fd 100644 --- a/drivers/flash/spi_flash_w25qxxdv.h +++ b/drivers/flash/spi_flash_w25qxxdv.h @@ -20,9 +20,7 @@ struct spi_flash_data { struct spi_cs_control cs_ctrl; #endif /* CONFIG_SPI_FLASH_W25QXXDV_GPIO_SPI_CS */ struct spi_config spi_cfg; -#if defined(CONFIG_MULTITHREADING) struct k_sem sem; -#endif /* CONFIG_MULTITHREADING */ }; diff --git a/ext/hal/ti/simplelink/Kconfig b/ext/hal/ti/simplelink/Kconfig index fd173640005fa3..9c4a0ffd9e9de8 100644 --- a/ext/hal/ti/simplelink/Kconfig +++ b/ext/hal/ti/simplelink/Kconfig @@ -9,7 +9,6 @@ config HAS_CC3220SDK config SIMPLELINK_HOST_DRIVER bool "Build the SimpleLink WiFi Host Driver" depends on HAS_CC3220SDK - depends on MULTITHREADING select NEWLIB_LIBC select ERRNO help diff --git a/include/kernel.h b/include/kernel.h index 72bcc4225b5873..faeb559801897c 100644 --- a/include/kernel.h +++ b/include/kernel.h @@ -4597,17 +4597,10 @@ extern void _sys_power_save_idle_exit(s32_t ticks); * private APIs that are utilized by one or more public APIs */ -#ifdef CONFIG_MULTITHREADING /** * @internal */ extern void _init_static_threads(void); -#else -/** - * @internal - */ -#define _init_static_threads() do { } while (false) -#endif /** * @internal diff --git a/kernel/Kconfig b/kernel/Kconfig index 64a890b347b94a..058c6aa8c4d8ce 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -9,22 +9,8 @@ menu "General Kernel Options" -config MULTITHREADING - bool "Multi-threading" - default y - help - If disabled, only the main thread is available, so a main() function - must be provided. Interrupts are available. Kernel objects will most - probably not behave as expected, especially with regards to pending, - since the main thread cannot pend, it being the only thread in the - system. - - Many drivers and subsystems will not work with this option; use only - when you REALLY know what you are doing. - config NUM_COOP_PRIORITIES - int "Number of coop priorities" if MULTITHREADING - default 1 if !MULTITHREADING + int "Number of coop priorities" default 16 range 0 128 help @@ -52,8 +38,7 @@ config NUM_COOP_PRIORITIES priority, and be the only thread at that priority. config NUM_PREEMPT_PRIORITIES - int "Number of preemptible priorities" if MULTITHREADING - default 0 if !MULTITHREADING + int "Number of preemptible priorities" default 15 range 0 128 help diff --git a/kernel/include/ksched.h b/kernel/include/ksched.h index f950e961c0fc58..7c9543f2505333 100644 --- a/kernel/include/ksched.h +++ b/kernel/include/ksched.h @@ -11,7 +11,6 @@ #include #include -#ifdef CONFIG_MULTITHREADING #define _VALID_PRIO(prio, entry_point) \ (((prio) == K_IDLE_PRIO && _is_idle_thread(entry_point)) || \ (_is_prio_higher_or_equal((prio), \ @@ -26,10 +25,6 @@ K_LOWEST_APPLICATION_THREAD_PRIO, \ K_HIGHEST_APPLICATION_THREAD_PRIO); \ } while (false) -#else -#define _VALID_PRIO(prio, entry_point) ((prio) == -1) -#define _ASSERT_VALID_PRIO(prio, entry_point) __ASSERT((prio) == -1, "") -#endif void _sched_init(void); void _add_thread_to_ready_q(struct k_thread *thread); diff --git a/kernel/init.c b/kernel/init.c index e9cdcfa87ce550..31d07d1f0100ed 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -244,7 +244,6 @@ void __weak main(void) /* NOP default main() if the application does not provide one. */ } -#if defined(CONFIG_MULTITHREADING) static void init_idle_thread(struct k_thread *thr, k_thread_stack_t *stack) { #ifdef CONFIG_SMP @@ -256,7 +255,6 @@ static void init_idle_thread(struct k_thread *thr, k_thread_stack_t *stack) K_LOWEST_THREAD_PRIO, K_ESSENTIAL, IDLE_THREAD_NAME); _mark_thread_as_started(thr); } -#endif /** * @@ -270,7 +268,6 @@ static void init_idle_thread(struct k_thread *thr, k_thread_stack_t *stack) * * @return N/A */ -#ifdef CONFIG_MULTITHREADING static void prepare_multithreading(struct k_thread *dummy_thread) { #ifdef CONFIG_ARCH_HAS_CUSTOM_SWAP_TO_MAIN @@ -322,11 +319,9 @@ static void prepare_multithreading(struct k_thread *dummy_thread) _mark_thread_as_started(_main_thread); _ready_thread(_main_thread); -#ifdef CONFIG_MULTITHREADING init_idle_thread(_idle_thread, _idle_stack); _kernel.cpus[0].idle_thread = _idle_thread; sys_trace_thread_create(_idle_thread); -#endif #if defined(CONFIG_SMP) && CONFIG_MP_NUM_CPUS > 1 init_idle_thread(_idle_thread1, _idle_stack1); @@ -371,7 +366,6 @@ static void switch_to_main_thread(void) (void)_Swap(irq_lock()); #endif } -#endif /* CONFIG_MULTITHREDING */ u32_t z_early_boot_rand32_get(void) { @@ -429,7 +423,6 @@ extern uintptr_t __stack_chk_guard; */ FUNC_NORETURN void _Cstart(void) { -#ifdef CONFIG_MULTITHREADING #ifdef CONFIG_ARCH_HAS_CUSTOM_SWAP_TO_MAIN struct k_thread *dummy_thread = NULL; #else @@ -440,7 +433,6 @@ FUNC_NORETURN void _Cstart(void) struct k_thread *dummy_thread = (struct k_thread *)&dummy_thread_memory; (void)memset(dummy_thread_memory, 0, sizeof(dummy_thread_memory)); -#endif #endif /* * The interrupt library needs to be initialized early since a series @@ -467,16 +459,8 @@ FUNC_NORETURN void _Cstart(void) __stack_chk_guard = z_early_boot_rand32_get(); #endif -#ifdef CONFIG_MULTITHREADING prepare_multithreading(dummy_thread); switch_to_main_thread(); -#else - bg_thread_main(NULL, NULL, NULL); - - irq_lock(); - while (true) { - } -#endif /* * Compiler can't tell that the above routines won't return and issues diff --git a/kernel/sched.c b/kernel/sched.c index a444b998265170..73f693d16ff979 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -803,7 +803,6 @@ Z_SYSCALL_HANDLER0_SIMPLE_VOID(k_yield); void _impl_k_sleep(s32_t duration) { -#ifdef CONFIG_MULTITHREADING /* volatile to guarantee that irq_lock() is executed after ticks is * populated */ @@ -828,7 +827,6 @@ void _impl_k_sleep(s32_t duration) _add_thread_timeout(_current, NULL, ticks); (void)_Swap(key); -#endif } #ifdef CONFIG_USERSPACE diff --git a/kernel/thread.c b/kernel/thread.c index 606380b267578e..65e4cbbb786c6d 100644 --- a/kernel/thread.c +++ b/kernel/thread.c @@ -253,7 +253,6 @@ void _check_stack_sentinel(void) } #endif -#ifdef CONFIG_MULTITHREADING void _impl_k_thread_start(struct k_thread *thread) { int key = irq_lock(); /* protect kernel queues */ @@ -271,9 +270,7 @@ void _impl_k_thread_start(struct k_thread *thread) #ifdef CONFIG_USERSPACE Z_SYSCALL_HANDLER1_SIMPLE_VOID(k_thread_start, K_OBJ_THREAD, struct k_thread *); #endif -#endif -#ifdef CONFIG_MULTITHREADING static void schedule_new_thread(struct k_thread *thread, s32_t delay) { #ifdef CONFIG_SYS_CLOCK_EXISTS @@ -291,7 +288,6 @@ static void schedule_new_thread(struct k_thread *thread, s32_t delay) k_thread_start(thread); #endif } -#endif #if !CONFIG_STACK_POINTER_RANDOM static inline size_t adjust_stack_size(size_t stack_size) @@ -410,7 +406,6 @@ void _setup_new_thread(struct k_thread *new_thread, sys_trace_thread_create(new_thread); } -#ifdef CONFIG_MULTITHREADING k_tid_t _impl_k_thread_create(struct k_thread *new_thread, k_thread_stack_t *stack, size_t stack_size, k_thread_entry_t entry, @@ -512,7 +507,6 @@ Z_SYSCALL_HANDLER(k_thread_create, return new_thread_p; } #endif /* CONFIG_USERSPACE */ -#endif /* CONFIG_MULTITHREADING */ /* LCOV_EXCL_START */ int _impl_k_thread_cancel(k_tid_t tid) @@ -621,7 +615,6 @@ void _k_thread_single_abort(struct k_thread *thread) #endif } -#ifdef CONFIG_MULTITHREADING #ifdef CONFIG_USERSPACE extern char __object_access_start[]; extern char __object_access_end[]; @@ -685,7 +678,6 @@ void _init_static_threads(void) irq_unlock(key); k_sched_unlock(); } -#endif void _init_thread_base(struct _thread_base *thread_base, int priority, u32_t initial_state, unsigned int options) diff --git a/lib/thread_entry.c b/lib/thread_entry.c index 384bdcaadbf03e..cde7afb064421d 100644 --- a/lib/thread_entry.c +++ b/lib/thread_entry.c @@ -28,13 +28,7 @@ FUNC_NORETURN void _thread_entry(k_thread_entry_t entry, { entry(p1, p2, p3); -#ifdef CONFIG_MULTITHREADING k_thread_abort(k_current_get()); -#else - for (;;) { - k_cpu_idle(); - } -#endif /* * Compiler can't tell that k_thread_abort() won't return and issues a diff --git a/samples/mpu/mpu_test/prj_single.conf b/samples/mpu/mpu_test/prj_single.conf deleted file mode 100644 index 3f40e856c8812e..00000000000000 --- a/samples/mpu/mpu_test/prj_single.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_MULTITHREADING=n diff --git a/subsys/logging/Kconfig b/subsys/logging/Kconfig index b427ce69daa9c5..adfe12604b619b 100644 --- a/subsys/logging/Kconfig +++ b/subsys/logging/Kconfig @@ -217,7 +217,6 @@ config LOG_PROCESS_TRIGGER_THRESHOLD config LOG_PROCESS_THREAD bool "Enable internal thread for log processing" - depends on MULTITHREADING default y help When enabled thread is created by the logger subsystem. Thread is diff --git a/subsys/shell/Kconfig b/subsys/shell/Kconfig index cc3f0db131fdfc..733a67cb0da835 100644 --- a/subsys/shell/Kconfig +++ b/subsys/shell/Kconfig @@ -48,14 +48,12 @@ source "subsys/logging/Kconfig.template.log_config" config SHELL_STACK_SIZE int "Shell thread stack size" - default 2048 if MULTITHREADING - default 0 if !MULTITHREADING + default 2048 help Stack size for thread created for each instance. config SHELL_THREAD_PRIO int "Shell thread priority" - depends on MULTITHREADING default -2 help Shell thread priority. diff --git a/subsys/shell/shell.c b/subsys/shell/shell.c index 84d8ff95e88bfb..5d41af2133a665 100644 --- a/subsys/shell/shell.c +++ b/subsys/shell/shell.c @@ -114,16 +114,8 @@ static void shell_write(const struct shell *shell, const void *data, if (tmp_cnt == 0 && (shell->ctx->state != SHELL_STATE_PANIC_MODE_ACTIVE)) { /* todo semaphore pend*/ - if (IS_ENABLED(CONFIG_MULTITHREADING)) { - k_poll(&shell->ctx->events[SHELL_SIGNAL_TXDONE], - 1, K_FOREVER); - } else { - /* Blocking wait in case of bare metal. */ - while (!shell->ctx->internal.flags.tx_rdy) { - - } - shell->ctx->internal.flags.tx_rdy = 0; - } + k_poll(&shell->ctx->events[SHELL_SIGNAL_TXDONE], + 1, K_FOREVER); } } } @@ -1294,14 +1286,10 @@ static int shell_instance_uninit(const struct shell *shell) int shell_uninit(const struct shell *shell) { - if (IS_ENABLED(CONFIG_MULTITHREADING)) { - /* signal kill message */ - (void)k_poll_signal(&shell->ctx->signals[SHELL_SIGNAL_KILL], 0); + /* signal kill message */ + (void)k_poll_signal(&shell->ctx->signals[SHELL_SIGNAL_KILL], 0); - return 0; - } else { - return shell_instance_uninit(shell); - } + return 0; } int shell_start(const struct shell *shell) diff --git a/subsys/shell/shell_log_backend.c b/subsys/shell/shell_log_backend.c index b17cc6bcbc3200..634f331a7f7f73 100644 --- a/subsys/shell/shell_log_backend.c +++ b/subsys/shell/shell_log_backend.c @@ -112,10 +112,8 @@ static void put(const struct log_backend *const backend, struct log_msg *msg) case SHELL_LOG_BACKEND_ENABLED: msg_to_fifo(shell, msg); - if (IS_ENABLED(CONFIG_MULTITHREADING)) { - signal = &shell->ctx->signals[SHELL_SIGNAL_LOG_MSG]; - k_poll_signal(signal, 0); - } + signal = &shell->ctx->signals[SHELL_SIGNAL_LOG_MSG]; + k_poll_signal(signal, 0); break; diff --git a/tests/kernel/threads/no-multithreading/CMakeLists.txt b/tests/kernel/threads/no-multithreading/CMakeLists.txt deleted file mode 100644 index 800ba5841af308..00000000000000 --- a/tests/kernel/threads/no-multithreading/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -cmake_minimum_required(VERSION 3.8.2) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) -project(NONE) - -FILE(GLOB app_sources src/*.c) -target_sources(app PRIVATE ${app_sources}) diff --git a/tests/kernel/threads/no-multithreading/prj.conf b/tests/kernel/threads/no-multithreading/prj.conf deleted file mode 100644 index 6e1dbf9c4beae0..00000000000000 --- a/tests/kernel/threads/no-multithreading/prj.conf +++ /dev/null @@ -1,12 +0,0 @@ -CONFIG_ZTEST=y -CONFIG_MULTITHREADING=n -CONFIG_BT=n -CONFIG_USB=n - -# Running without multithreading implies the lack of MMU support. -# Setting CONFIG_USERSPACE=n alone is not enough to disable userspace. -# The TEST_USERSPACE symbol (designed to enable userspace by default -# on tests platforms that support it) defaults to =y and will -# automatically select it back. -CONFIG_TEST_USERSPACE=n -CONFIG_USERSPACE=n diff --git a/tests/kernel/threads/no-multithreading/src/main.c b/tests/kernel/threads/no-multithreading/src/main.c deleted file mode 100644 index b39bf59bfce884..00000000000000 --- a/tests/kernel/threads/no-multithreading/src/main.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2018 Intel Corporation - * - * SPDX-License-Identifier: Apache-2.0 - */ -#include -#include - -/* The only point to CONFIG_MULTITHREADING=n is to use Zephyr's - * multiplatform toolchain, linkage and boostrap integration to arrive - * here so the user can run C code unimpeded. In general, we don't - * promise that *any* Zephyr APIs are going to work properly, so don't - * try to test any. That means we can't even use the ztest suite - * framework (which spawns threads internally). - */ -void test_main(void) -{ - TC_PRINT("It works\n"); - TC_END_REPORT(TC_PASS); -} diff --git a/tests/kernel/threads/no-multithreading/testcase.yaml b/tests/kernel/threads/no-multithreading/testcase.yaml deleted file mode 100644 index c4219e5e33a5a7..00000000000000 --- a/tests/kernel/threads/no-multithreading/testcase.yaml +++ /dev/null @@ -1,8 +0,0 @@ -tests: - kernel.threads.no-multithreading: - tags: core - filter: not CONFIG_SMP - - # Pulls in GPIO by default, which needs missing APIs (why?!), but - # its headers won't build with GPIO disabled. - platform_exclude: galileo