1.. _nothread: 2 3Operation without Threads 4######################### 5 6Thread support is not necessary in some applications: 7 8* Bootloaders 9* Simple event-driven applications 10* Examples intended to demonstrate core functionality 11 12Thread support can be disabled by setting 13:kconfig:option:`CONFIG_MULTITHREADING` to ``n``. Since this configuration has 14a significant impact on Zephyr's functionality and testing of it has 15been limited, there are conditions on what can be expected to work in 16this configuration. 17 18What Can be Expected to Work 19**************************** 20 21These core capabilities shall function correctly when 22:kconfig:option:`CONFIG_MULTITHREADING` is disabled: 23 24* The :ref:`build system <application>` 25 26* The ability to boot the application to ``main()`` 27 28* :ref:`Interrupt management <interrupts_v2>` 29 30* The system clock including :c:func:`k_uptime_get` 31 32* Timers, i.e. :c:func:`k_timer` 33 34* Non-sleeping delays e.g. :c:func:`k_busy_wait`. 35 36* Sleeping :c:func:`k_cpu_idle`. 37 38* Pre ``main()`` drivers and subsystems initialization e.g. :c:macro:`SYS_INIT`. 39 40* :ref:`kernel_memory_management_api` 41 42* Specifically identified drivers in certain subsystems, listed below. 43 44The expectations above affect selection of other features; for example 45:kconfig:option:`CONFIG_SYS_CLOCK_EXISTS` cannot be set to ``n``. 46 47What Cannot be Expected to Work 48******************************* 49 50Functionality that will not work with :kconfig:option:`CONFIG_MULTITHREADING` 51includes majority of the kernel API: 52 53* :ref:`threads_v2` 54 55* :ref:`scheduling_v2` 56 57* :ref:`workqueues_v2` 58 59* :ref:`polling_v2` 60 61* :ref:`semaphores_v2` 62 63* :ref:`mutexes_v2` 64 65* :ref:`condvar` 66 67* :ref:`kernel_data_passing_api` 68 69.. contents:: 70 :local: 71 :depth: 1 72 73Subsystem Behavior Without Thread Support 74***************************************** 75 76The sections below list driver and functional subsystems that are 77expected to work to some degree when :kconfig:option:`CONFIG_MULTITHREADING` is 78disabled. Subsystems that are not listed here should not be expected to 79work. 80 81Some existing drivers within the listed subsystems do not work when 82threading is disabled, but are within scope based on their subsystem, or 83may be sufficiently isolated that supporting them on a particular 84platform is low-impact. Enhancements to add support to existing 85capabilities that were not originally implemented to work with threads 86disabled will be considered. 87 88Flash 89===== 90 91The :ref:`flash_api` is expected to work for all SoC flash peripheral 92drivers. Bus-accessed devices like serial memories may not be 93supported. 94 95*List/table of supported drivers to go here* 96 97GPIO 98==== 99 100The :ref:`gpio_api` is expected to work for all SoC GPIO peripheral 101drivers. Bus-accessed devices like GPIO extenders may not be supported. 102 103*List/table of supported drivers to go here* 104 105UART 106==== 107 108A subset of the :ref:`uart_api` is expected to work for all SoC UART 109peripheral drivers. 110 111* Applications that select :kconfig:option:`CONFIG_UART_INTERRUPT_DRIVEN` may 112 work, depending on driver implementation. 113 114* Applications that select :kconfig:option:`CONFIG_UART_ASYNC_API` may 115 work, depending on driver implementation. 116 117* Applications that do not select either :kconfig:option:`CONFIG_UART_ASYNC_API` 118 or :kconfig:option:`CONFIG_UART_INTERRUPT_DRIVEN` are expected to work. 119 120*List/table of supported drivers to go here, including which API options 121are supported* 122