Work In Progress

NuttX 12.0.0 has not been released yet. These Release Notes are a work-in-progress in preparation for the next release of NuttX.  There is a board tracking the PRs that need to be looked at to add to this doc for the OS TODO ADD LINK and for the Apps TODO ADD LINK

What's New In This Release

Major Changes to Core OS

Bug Fixes

 * [#7493](https://github.com/apache/incubator-nuttx/pull/7493) sched: clock: adjust clock function to support tick
 * [#7200](https://github.com/apache/incubator-nuttx/pull/7200) sched: clock: Rename g_system_timer to g_system_ticks
 * [#6936](https://github.com/apache/incubator-nuttx/pull/6936) sched: cpuload: fix cpuload error
 * [#7318](https://github.com/apache/incubator-nuttx/pull/7318) sched: env: Skip the envirnment variable duplication of kernel thread
 * [#7490](https://github.com/apache/incubator-nuttx/pull/7490) sched: getprioritymax: handle invaild policy as posix style
 * [#7563](https://github.com/apache/incubator-nuttx/pull/7563) sched: group_setupidlefiles: fall back to /dev/null if /dev/console is disabled
 * [#7235](https://github.com/apache/incubator-nuttx/pull/7235) sched: irq: Refactor irq_spinlock.c
 * [#7469](https://github.com/apache/incubator-nuttx/pull/7469) sched: mutex: NXMUTEX_INITIALIZER should enable priority inheritance
 * [#7095](https://github.com/apache/incubator-nuttx/pull/7095) sched: mqueue: fix resource leak in mq_timedsend()
 * [#7088](https://github.com/apache/incubator-nuttx/pull/7088) sched: msgq: add support of System V message queue
 * [#7838](https://github.com/apache/incubator-nuttx/pull/7838) sched: nx_bringup: Set the initial stack size in kernel build as well
 * [#7492](https://github.com/apache/incubator-nuttx/pull/7492) sched: posix/timer: handle invaild timerid correctly
 * [#6905](https://github.com/apache/incubator-nuttx/pull/6905) sched: prctl: Replace strncpy with strlcpy for safety
 * [#7267](https://github.com/apache/incubator-nuttx/pull/7267) sched: sem: don't clear waitobj when do sem recover
 * [#6967](https://github.com/apache/incubator-nuttx/pull/6967) sched: semaphore: add sem_count temporary variable to improve performance
 * [#6318](https://github.com/apache/incubator-nuttx/pull/6318) sched: semaphore: fix priority boost restoration for priority inheritance
 * [#7456](https://github.com/apache/incubator-nuttx/pull/7456) sched: semaphore: add the wdog judge before cancel
 * [#7583](https://github.com/apache/incubator-nuttx/pull/7583) sched: signal: fix sigtimedwait error handling
 * [#7327](https://github.com/apache/incubator-nuttx/pull/7327) sched: spawn: Add the dummy task_spawnattr_xxxstackyyy in the kernel mode
 * [#7485](https://github.com/apache/incubator-nuttx/pull/7485) sched: spawn: Rename task_spawnattr_[get|set]stack[size|addr] to posix_spawnattr_[get|set]stack[size|addr]
 * [#7597](https://github.com/apache/incubator-nuttx/pull/7597) sched: task: task_getpid: getpid should return process id not thread id
 * [#7018](https://github.com/apache/incubator-nuttx/pull/7018) sched: wqueue: change single queue to double queue to improve speed
 * [#6996](https://github.com/apache/incubator-nuttx/pull/6996) sched: wqueue: fix visual studio Compiler Error C2059
 * [#7477](https://github.com/apache/incubator-nuttx/pull/7477) sched: change the type of tg_joinlock, mm_lock and md_lock from sem_t to mutex_t
 * [#7019](https://github.com/apache/incubator-nuttx/pull/7019) sched: fix corner case wd_cancel assert crash
 * [#7062](https://github.com/apache/incubator-nuttx/pull/7062) sched: fix kasan report error when open CONFIG_DEBUG_MM
 * [#6948](https://github.com/apache/incubator-nuttx/pull/6948) sched: fix macro "SCHED_NOTE_PRINTF" requires 3 argumnets, but only 1 given
 * [#7322](https://github.com/apache/incubator-nuttx/pull/7322) sched: fix runtime error UBSan(division by zero)
 * [#7792](https://github.com/apache/incubator-nuttx/pull/7792) sched: Improve UBSan configuraion
 * [#7159](https://github.com/apache/incubator-nuttx/pull/7159) sched: merge waitsem and msgwaitq
 * [#7791](https://github.com/apache/incubator-nuttx/pull/7791) sched: move _assert to kernel space.
 * [#7837](https://github.com/apache/incubator-nuttx/pull/7837) sched: move sched_note.c to drivers/note
 * [#7810](https://github.com/apache/incubator-nuttx/pull/7810) sched: pthread_mutex_timedlock never returns EINTR
 * [#7816](https://github.com/apache/incubator-nuttx/pull/7816) sched: Remove intr and EINTR from pthread mutex 
 * [#7276](https://github.com/apache/incubator-nuttx/pull/7276) sched: Minor fix backtrace config
 * [#7459](https://github.com/apache/incubator-nuttx/pull/7459) sched: use pid to check idle task
 * [#7196](https://github.com/apache/incubator-nuttx/pull/7196) sched: Optimize sched_note_begin/end
 * [#7471](https://github.com/apache/incubator-nuttx/pull/7471) sched: Remove the unnecessary (FAR sem_t *) cast
 * [#6862](https://github.com/apache/incubator-nuttx/pull/6862) sched: Remove the unnecessary weak_function
 * [#6958](https://github.com/apache/incubator-nuttx/pull/6958) sched: Remove volatile from the task list
 * [#7808](https://github.com/apache/incubator-nuttx/pull/7808) sched: move common assert logic together.
 * [#6987](https://github.com/apache/incubator-nuttx/pull/6987) sched: semaphore and mqueue task list optimize
 * [#7339](https://github.com/apache/incubator-nuttx/pull/7339) sched: Simplify HAVE_GROUP_MEMBERS logic
 * [#6866](https://github.com/apache/incubator-nuttx/pull/6866) sched: Simplify the cpuload process
 * [#7511](https://github.com/apache/incubator-nuttx/pull/7511) sched: remove sched_continue, merge code
 * [#7599](https://github.com/apache/incubator-nuttx/pull/7599) sched: remove nxsched_remove_blocked from up_unblock_task
 * [#7364](https://github.com/apache/incubator-nuttx/pull/7364) sched: Support the stack size and address for posix_spawn and kernel mode
 * [#7415](https://github.com/apache/incubator-nuttx/pull/7415) sched: Pass idle thread envionment variables to the child task through copy
 * [#7454](https://github.com/apache/incubator-nuttx/pull/7454) sched: remove the unused function nx_wait and nx_waitid
 * [#7605](https://github.com/apache/incubator-nuttx/pull/7605) sched: mqueue: make mqueue and mqueue sysv can disable separately
 * [#7656](https://github.com/apache/incubator-nuttx/pull/7656) sched: merge up_block_task and up_unblock_task
 * [#7065](https://github.com/apache/incubator-nuttx/pull/7065) sched: wqueue: fix race-condition on work_queue

 * [#7815](https://github.com/apache/incubator-nuttx/pull/7815) mm: iob: reserved bytes should be updated after each iteration
 * [#7714](https://github.com/apache/incubator-nuttx/pull/7714) mm: iob: new function iob_reserve() to adjust headroom offset
 * [#6836](https://github.com/apache/incubator-nuttx/pull/6836) mm: iob: Remove iob_user_e enum and related code
 * [#6834](https://github.com/apache/incubator-nuttx/pull/6834) mm: iob: modify iob to support header padding and alignment features
 * [#7066](https://github.com/apache/incubator-nuttx/pull/7066) mm: kasan: use init value to avoid kasan used before bss clear
 * [#7509](https://github.com/apache/incubator-nuttx/pull/7509) mm: kasan: fix kasan race-condition #
 * [#6804](https://github.com/apache/incubator-nuttx/pull/6804) mm: mempool: support mempool and show mempool info in procfs
 * [#7450](https://github.com/apache/incubator-nuttx/pull/7450) mm: mempool: support multiple-mempool and enhance mempool
 * [#7581](https://github.com/apache/incubator-nuttx/pull/7581) mm: mm_heap: Change TCB_FLAG_HEAPCHECK to TCB_FLAG_HEAP_CHECK
 * [#7449](https://github.com/apache/incubator-nuttx/pull/7449) mm: mm_heap: optimize MM_XX_SHIFT define
 * [#7495](https://github.com/apache/incubator-nuttx/pull/7495) mm: mm_heap: add debug assert to check the alignment problem
 * [#6928](https://github.com/apache/incubator-nuttx/pull/6928) mm: mm_heap: Avoid assertion violation in case of kmm_free(NULL)
 * [#7662](https://github.com/apache/incubator-nuttx/pull/7662) mm: mm_size2ndx: using flsl to calculate the ndx
 * [#7618](https://github.com/apache/incubator-nuttx/pull/7618) mm: shm: Implement a generic utility API for creating / destroying shm mappings
 * [#7607](https://github.com/apache/incubator-nuttx/pull/7607) mm: shm: Implement shmem drivers for risc-v target
 * [#7134](https://github.com/apache/incubator-nuttx/pull/7134) mm: ubsan: UBSan option should be turned on if SIM_UBSAN enabled
 * [#7301](https://github.com/apache/incubator-nuttx/pull/7301) mm: ubsan: Ubsan
 * [#7285](https://github.com/apache/incubator-nuttx/pull/7285) mm: ubsan: Fixed undefined behavior in UBSan.
 * [#6986](https://github.com/apache/incubator-nuttx/pull/6986) mm: ubsan: Allow custom the sanitizer in Kconfig
 * [#6881](https://github.com/apache/incubator-nuttx/pull/6881) mm: ubsan: debug: Introduce portion of UBSan
 * [#6979](https://github.com/apache/incubator-nuttx/pull/6979) mm: umm_heap: Do not register Umem if CONFIG_BUILD_KERNEL=y
 * [#6995](https://github.com/apache/incubator-nuttx/pull/6995) mm: Check the function result with suitable macro.
 * [#7457](https://github.com/apache/incubator-nuttx/pull/7457) mm: Check for memory leaks in tasks
 * [#6999](https://github.com/apache/incubator-nuttx/pull/6999) mm: fix runtime error by UBSan #
 * [#7536](https://github.com/apache/incubator-nuttx/pull/7536) mm: Refine mm Kconfig
 * [#7551](https://github.com/apache/incubator-nuttx/pull/7551) mm: Remove the unused macro MM_IS_ALLOCATED
 * [#7540](https://github.com/apache/incubator-nuttx/pull/7540) mm: Restore the return type of mm_lock from bool to int


Major Changes to the Build System

New Features

Bug Fixes

Architectural Support

New Architecture Support

Driver Support

Bug Fixes

New Driver Support

Drivers With Significant Improvements

Board Support

Significant Improvements

New Board Support

Boards With Significant Improvements

File System

Bug Fixes

Significant Improvements

Networking

Applications

Improvements

Bug Fixes

Security Issues Fixed In This Release

Compatibility Concerns

API Changes

Default Semaphore Protocol Changed

When NuttX is built with priority inheritance (CONFIG_PRIORITY_INHERITANCE), priority inheritance can be enabled or disabled per semaphore and care must be taken to make the correct choice based on how each semaphore is used.

When a semaphore is used as a mutual exclusion lock ("locking semaphore"), a thread that needs exclusive access to a resource waits on the semaphore, uses the resource, and then posts the semaphore. In this case, priority inheritance should be enabled for the semaphore (sem_setprotocol(sem, SEM_PRIO_INHERIT)) to mitigate priority inversion which could occur when multiple threads with different priorities compete for various resources.

In contrast, when a semaphore is used to signal an event from one thread to another ("signaling semaphore"), one thread waits on the semaphore and another thread posts it when the anticipated event occurs. In this case, since the thread that posts the semaphore is different than the one that waits on it, priority inheritance must not be enabled for the semaphore (sem_setprotocol(sem, SEM_PRIO_NONE)).

In earlier releases, priority inheritance was enabled by default for all semaphores whenever NuttX was built with CONFIG_PRIORITY_INHERITANCE. If a semaphore was used for signaling across threads, the non-standard API sem_setprotocol(sem, SEM_PRIO_NONE) had to be used to selectively disable priority inheritance for that semaphore.

Starting with this release, the default is changed: priority inheritance is disabled by default for all semaphores. To enable priority inheritance for a semaphore, first NuttX needs to be built with CONFIG_PRIORITY_INHERITANCE, then priority inheritance needs to be enabled for the semaphore in question with sem_setprotocol(sem, SEM_PRIO_INHERIT).

The benefit of this change is easier porting and maintenance of standards-compliant applications to NuttX by eliminating the need for 3rd party applications to call the non-standard API sem_setprotocol().

In addition, this is a safer default: Having priority inheritance inadvertently enabled for a signaling semaphore can cause incorrect behavior, while the impact of having it inadvertently disabled for a locking semaphore is limited to reduced performance.

This change was introduced in PR # 5070 https://github.com/apache/incubator-nuttx/pull/5070, git commits 4e1d967bcd0031bd07a6a46f022c75216cf98404e5fbbd416d5f1e74e3f705677b2e99b0b8c544d39a4b66fbb306d388e2ce431807a139848604a9f0, and 125de66b63b316a2c2a2912dd408f4bac2fc85c3.

All semaphore uses within the NuttX repositories have been updated; those used for locking have been replaced with mutexes (mutex_t instead of sem_t). See PR # 6965, git commits 

ef3919e4eb75b1ab854a21c98124d7e90e5c5e14590e0d5666c47dcb91ccd35faa57681ca26d4b1d, and 5db565c78d7c009eaea8517f01a2d138ab5f0028.

Downstream users need to call sem_setprotocol(sem, SEM_PRIO_INHERIT) when setting up each semaphore used for mutual exclusion locking. In addition, they may optionally remove calls to sem_setprotocol(sem, SEM_PRIO_NONE) for signaling semaphores.

Changes to Build System

Renamed or Modified Kconfig Options

Known Problems In This Release

More Information

How to Download

Release artifacts for all current and past NuttX releases can be downloaded at:

How to Clone the Git Repository

The Apache NuttX project uses Git SCM as its version control system.

There are two primary repositories:

The main "Single Source of Truth" repositories are hosted by the ASF:

These are synchronized with repositories hosted at GitHub:

How to Contact the Community

The main forum for project communication, to ask a question, get involved, or contribute to NuttX, is our mailing list, dev@nuttx.apache.org. The list is publicly archived and searchable at https://lists.apache.org/list.html?dev@nuttx.apache.orgFor more information, see NuttX Community.

Enthusiastic Contributors Welcome!

NuttX is a free open-source project. If you'd like to participate, whether it's to enhance documentation (even these release notes) or dive into the nitty gritty of some low-level drivers, please join us! You can join the conversation at our dev mailing list by emailing dev-subscribe@nuttx.apache.org. The mailing list is open to the public and archived. You can browse older messages at https://lists.apache.org/list.html?dev@nuttx.apache.org.