Apache NuttX is a mature, real-time embedded operating system (RTOS) https://nuttx.apache.org/
Find a file
Ville Juven bb85ad849e pthread_cond_wait: Use atomic_t to protect the waiter count
The load/compare and RMW to wait_count need protection. Using atomic
operations should resolve both issues.

NOTE:
The assumption that the user will call pthread_cond_signal /
pthread_cond_broadcast with the mutex given to pthread_cond_wait held is
simply not true. It MAY hold it, but it is not forced. Thus, using the
user space lock for protecting the wait counter as well is not valid!

The pthread_cond_signal() or pthread_cond_broadcast() functions may be called by a thread whether or not it currently owns the mutex that threads calling pthread_cond_wait() or pthread_cond_timedwait() have associated with the condition variable during their waits; however, if predictable scheduling behaviour is required, then that mutex is locked by the thread calling pthread_cond_signal() or pthread_cond_broadcast().

[1] https://pubs.opengroup.org/onlinepubs/7908799/xsh/pthread_cond_signal.html
2025-01-20 23:55:26 +08:00
.github CI: Increase CI Jobs to 100% for Complex PRs 2025-01-08 15:05:18 +08:00
arch mpfs_i2c.c: Replace sem_getvalue with nxsem_getvalue 2025-01-20 23:55:26 +08:00
audio Fix some minor style issues 2024-11-20 10:51:07 +01:00
binfmt macro/align: Use ALIGN_UP and ALIGN_DOWN uniformly 2025-01-12 16:48:35 +08:00
boards libc: Rename LIBC_STRING_OPTIMIZE to LIBC_NEWLIB_OPTSPEED 2025-01-20 22:27:19 +08:00
cmake cmake: Use EXTRAFLAGS to define customized compilation options 2025-01-18 14:12:49 +08:00
crypto crypto/xform.c: migrate to SPDX identifier 2024-12-19 14:48:18 +08:00
Documentation Documentation: Fix typo and list format in Rust guide 2025-01-20 17:41:52 +08:00
drivers drivers/video/fb.c: Replace sem_getvalue with nxsem_getvalue 2025-01-20 23:55:26 +08:00
dummy
fs v9fs:socket driver 2025-01-20 17:12:14 +08:00
graphics
include pthread_cond_wait: Use atomic_t to protect the waiter count 2025-01-20 23:55:26 +08:00
libs pthread_barrier_destroy: Fix return value, if sem_getvalue fails 2025-01-20 23:55:26 +08:00
mm mm/kmap/kmm_map.c: Fix argument to gran_free 2025-01-15 17:10:57 +08:00
net inet_sockif:support multiple iov recv 2025-01-20 17:12:14 +08:00
openamp Remove all jira and changeid information from the kernel 2024-11-06 02:04:03 +08:00
pass1
sched pthread_cond_wait: Use atomic_t to protect the waiter count 2025-01-20 23:55:26 +08:00
syscall Revert "system: pthread_barrierwait should be moved to kernel space" 2024-11-15 22:07:25 +08:00
tools [CI] testbuild.sh: Msys2 fix toolchain change 2025-01-17 23:25:46 +08:00
video
wireless bt_buf: use small lock in wireless/bluetooth/bt_buf.c 2024-12-18 18:11:08 +08:00
.asf.yaml
.gitignore gitignore: add Emacs auto-save files 2025-01-15 16:10:22 +08:00
.pre-commit-config.yaml
.yamllint
AUTHORS AUTHORS: add Yamamoto Takashi 2024-11-04 22:29:22 +08:00
CMakeLists.txt Revert "kconfiglib/mark: It should use pip instead of apt install" 2025-01-13 19:12:25 -03:00
CONTRIBUTING.md
INVIOLABLES.md
Kconfig debug symbol level: Use config instead 2024-12-04 22:36:45 +08:00
LICENSE
Makefile
NOTICE
README.md
ReleaseNotes

POSIX Badge License Issues Tracking Badge Contributors GitHub Build Badge Documentation Badge

Apache NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).

For brevity, many parts of the documentation will refer to Apache NuttX as simply NuttX.

Getting Started

First time on NuttX? Read the Getting Started guide! If you don't have a board available, NuttX has its own simulator that you can run on terminal.

Documentation

You can find the current NuttX documentation on the Documentation Page.

Alternatively, you can build the documentation yourself by following the Documentation Build Instructions.

The old NuttX documentation is still available in the Apache wiki.

Supported Boards

NuttX supports a wide variety of platforms. See the full list on the Supported Platforms page.

Contributing

If you wish to contribute to the NuttX project, read the Contributing guidelines for information on Git usage, coding standard, workflow and the NuttX principles.

License

The code in this repository is under either the Apache 2 license, or a license compatible with the Apache 2 license. See the License Page for more information.