Zephyr Project Requirements
Futex

SPDX-License-Identifier: Apache-2.0

ZEP-SRS-37-6
1. Pending on a futex UID: ZEP-SRS-37-6 STATUS: Draft TYPE: Functional COMPONENT: Futex RELATIONS (Parent): STATEMENT:

The Zephyr RTOS shall provide a mechanism for a thread to pend on a futex.

ZEP-SRS-37-1
2. Pending on a futex with a changed value UID: ZEP-SRS-37-1 STATUS: Draft TYPE: Functional COMPONENT: Futex RELATIONS (Parent): STATEMENT:

When a thread attempts to pend on a futex and the futex value differs from the expected value, the Zephyr RTOS shall return immediately with an error indicating the futex value changed.

ZEP-SRS-37-2
3. Waking threads pending on a futex UID: ZEP-SRS-37-2 STATUS: Draft TYPE: Functional COMPONENT: Futex RELATIONS (Parent): STATEMENT:

The Zephyr RTOS shall provide a mechanism to wake either the highest-priority thread or all threads pending on a futex.

ZEP-SRS-37-3
4. Futex operation from user mode UID: ZEP-SRS-37-3 STATUS: Draft TYPE: Functional COMPONENT: Futex RELATIONS (Parent): STATEMENT:

The Zephyr RTOS shall allow user mode threads to operate on a futex located in memory they can access.

ZEP-SRS-37-4
5. Pending on a futex with a matching value UID: ZEP-SRS-37-4 STATUS: Draft TYPE: Functional COMPONENT: Futex RELATIONS (Parent): STATEMENT:

When a thread attempts to pend on a futex and the futex value matches the expected value, the Zephyr RTOS shall block the thread until the futex is woken or the specified timeout elapses.

ZEP-SRS-37-5
6. Futex access control UID: ZEP-SRS-37-5 STATUS: Draft TYPE: Functional COMPONENT: Futex RELATIONS (Parent): STATEMENT:

If a futex operation refers to memory the calling thread cannot access, then the Zephyr RTOS shall reject the operation with an error indicating the access is denied.