Zephyr Project Requirements
Zephyr Software Requirements

Zephyr Software Requirements

STATEMENT:

SPDX-License-Identifier: Apache-2.0

1. Hardware Architecture Interface

STATEMENT:

SPDX-License-Identifier: Apache-2.0

1.1. Atomic Operations
UID: ZEP-SRS-19-1
STATUS: Draft
TYPE: Functional
COMPONENT: Hardware Architecture Interface
parent relations:
STATEMENT:

The Zephyr RTOS shall provide an interface functionality to access memory while ensuring mutual exclusion. Note: Implementation by atomic variables and accessing them by APIs.

USER_STORY:

As a Zephyr RTOS user I want to read from or write into a memory areas without being disturbed by other threads or ISRs.

1.2. Thread Context Switching
UID: ZEP-SRS-19-2
STATUS: Draft
TYPE: Functional
COMPONENT: Hardware Architecture Interface
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism for context switching between threads.

USER_STORY:

As a Zephyr RTOS user I want to execute code concurrently in one or more threads and when interrupted at a code location in a thread, to continue at the very same location.

1.3. Software Exceptions
UID: ZEP-SRS-19-3
STATUS: Draft
TYPE: Functional
COMPONENT: Hardware Architecture Interface
parent relations:
STATEMENT:

The Zephyr RTOS shall provide an interface to implement software exceptions.

USER_STORY:

As a Zephyr RTOS user I want to catch any software exception and handle it according to my application needs.

1.4. Processor Mode Support
UID: ZEP-SRS-19-4
STATUS: Draft
TYPE: Functional
COMPONENT: Hardware Architecture Interface
parent relations:
STATEMENT:

The Zephyr RTOS shall provide an interface for managing processor modes.

USER_STORY:

If MCU power state was meant here: As a Zephyr RTOS user I want to control the MCU's power saving mode such e.g. operation, sleep, deep sleep or similar as supported by the selected MCU.

2. C library

STATEMENT:

SPDX-License-Identifier: Apache-2.0

2.1. Formatted output
UID: ZEP-SRS-18-1
STATUS: Draft
TYPE: Functional
COMPONENT: C Library
parent relations:
STATEMENT:

The Zephyr RTOS shall support formatted output.

USER_STORY:

As a Zephyr RTOS user, I want to be able to printf with various output formats.

2.2. Floating Point Math Support
UID: ZEP-SRS-18-2
STATUS: Draft
TYPE: Functional
COMPONENT: C Library
parent relations:
STATEMENT:

The Zephyr RTOS shall support floating point math libraries for processors where floating point is available.

USER_STORY:

As a Zephyr RTOS user, I want to be able to calculate with floating point numbers.

2.3. Boolean Primitives Support
UID: ZEP-SRS-18-3
STATUS: Draft
TYPE: Functional
COMPONENT: C Library
parent relations:
STATEMENT:

The Zephyr RTOS shall support boolean primitives.

USER_STORY:

As a Zephyr RTOS user, I want to be able to work with boolean values and logic.

2.4. Standard Unix time interface
UID: ZEP-SRS-18-4
STATUS: Draft
TYPE: Functional
COMPONENT: C Library
parent relations:
STATEMENT:

The Zephyr RTOS shall support the standard UNIX time interface.

USER_STORY:

As a Zephyr User, I want to be able to use system time.

2.5. Strings support
UID: ZEP-SRS-18-5
STATUS: Draft
TYPE: Functional
COMPONENT: C Library
parent relations:
STATEMENT:

The Zephyr RTOS shall support an interface to manage strings.

USER_STORY:

As a Zephyr RTOS user, I want to be able to manipulate text strings.

2.6. Moving/copying regions of memory
UID: ZEP-SRS-18-6
STATUS: Draft
TYPE: Functional
COMPONENT: C Library
parent relations:
STATEMENT:

The Zephyr RTOS shall support an interface to move contents between regions of memory.

USER_STORY:

As a Zephyr RTOS user, I want to copy the memory contents to different addresses.

2.7. I/O based interface
UID: ZEP-SRS-18-7
STATUS: Draft
TYPE: Functional
COMPONENT: C Library
parent relations:
STATEMENT:

The Zephyr RTOS shall support a file i/O based interface for driver communication.

USER_STORY:

As a Zephyr RTOS user, I want to be able to use File I/O functions.

2.8. C99 integer types
UID: ZEP-SRS-18-8
STATUS: Draft
TYPE: Functional
COMPONENT: C Library
parent relations:
STATEMENT:

The Zephyr RTOS shall support standard C99 integer types.

USER_STORY:

As a Zephyr RTOS user, I want to be able to calculate with C99 Integers.

2.9. Standard System Error Numbers (IEEE Std 1003.1-2017)
UID: ZEP-SRS-18-9
STATUS: Draft
TYPE: Functional
COMPONENT: C Library
parent relations:
STATEMENT:

The Zephyr RTOS shall support standard system error numbers as defined by IEEE Std 1003.1-2017.

USER_STORY:

As a Zephyr RTOS user, I want to be able to use IEE Std 1003.1-2017 Error Numbers for Interoperability.

2.10. Document set of Zephyr OS required C library functions in Safety Manual
UID: ZEP-SRS-18-10
STATUS: Draft
TYPE: Functional
COMPONENT: C Library
parent relations:
STATEMENT:

The set of C Library functions required by Zephyr needs to be documented in the Zephyr Safety Manual.

USER_STORY:

As a Zephyr user, I want to know which C library functions are being called by the Zephyr OS safety scope code.

2.11. Support external C libraries documentation in Zephyr Safety Manual
UID: ZEP-SRS-18-11
STATUS: Draft
TYPE: Functional
COMPONENT: C Library
parent relations:
STATEMENT:

The Zephyr Safety Manual needs to specify how to configure the support of external C Libraries.

USER_STORY:

As a Zephyr User, I need to understand how to configure the external C libraries to align with the validation that has been performed.

3. Device Driver API

STATEMENT:

SPDX-License-Identifier: Apache-2.0

3.1. Device Driver Abstraction
UID: ZEP-SRS-14-1
STATUS: Draft
TYPE: Functional
COMPONENT: Device Driver API
STATEMENT:

The Zephyr RTOS shall provide abstraction of device drivers with common functionalities as an intermediate interface between applications and device drivers, where such interface is implemented by individual device drivers.

Proposal for replacement: Zephyr shall provide an interface between application and individual device drivers to provide an abstraction of device drivers with common functionalities.

3.2. Expose kernel to hardware interrupts
UID: ZEP-SRS-14-2
STATUS: Draft
TYPE: Functional
COMPONENT: Device Driver API
STATEMENT:

The Zephyr RTOS shall provide an interface for managing a defined set of hardware exceptions (including interrupts) across all systems.

USER_STORY:

As a Zephyr RTOS user I want hardware exceptions (hardware failures, programming mistakes) to be handled gracefully (no program crashes as far as possible).

4. Exception and Error Handling

STATEMENT:

SPDX-License-Identifier: Apache-2.0

4.1. Fatal Exception Error Handler
UID: ZEP-SRS-16-1
STATUS: Draft
TYPE: Functional
COMPONENT: Exception and Error Handling
STATEMENT:

The Zephyr RTOS shall provide default handlers for exceptions.

USER_STORY:

As a Zephyr RTOS user I want exceptions which I did not handle explicitly (by mistake or on purpose) to be caught by a default handler, defined either by Zephyr OS or by myself.

4.2. Default handler for fatal errors
UID: ZEP-SRS-16-2
STATUS: Draft
TYPE: Functional
COMPONENT: Exception and Error Handling
STATEMENT:

The Zephyr RTOS shall provide default handlers for fatal errors that do not have a dedicated handler.

4.3. Assigning a specific handler
UID: ZEP-SRS-16-3
STATUS: Draft
TYPE: Functional
COMPONENT: Exception and Error Handling
STATEMENT:

The Zephyr RTOS shall provide an interface to assign a specific handler with an exception.

4.4. Assigning a specific handler (2)
UID: ZEP-SRS-16-4
STATUS: Draft
TYPE: Functional
COMPONENT: Exception and Error Handling
STATEMENT:

The Zephyr RTOS shall provide an interface to assign a specific handler for a fatal error.

5. System Initialization

STATEMENT:

SPDX-License-Identifier: Apache-2.0

STATEMENT:

TBD

6. File system

STATEMENT:

SPDX-License-Identifier: Apache-2.0

6.1. Create file
UID: ZEP-SRS-17-1
STATUS: Draft
TYPE: Functional
COMPONENT: File System
STATEMENT:

Zephyr shall provide file create capabilities for files on the file system.

USER_STORY:

As a Zephyr OS user I want to be able to create a new file or overwrite an existing file at the same filesystem location / identifier (e.g. path + name).

6.2. Open files
UID: ZEP-SRS-17-2
STATUS: Draft
TYPE: Functional
COMPONENT: File System
STATEMENT:

Zephyr shall provide file open capabilities for files on the file system.

USER_STORY:

As a Zephyr OS user I want to be able to open a file for writing or reading. When opened for writing, I want to have exclusive access to the file.

6.3. Read files
UID: ZEP-SRS-17-3
STATUS: Draft
TYPE: Functional
COMPONENT: File System
STATEMENT:

Zephyr shall provide read access to files in the file system.

USER_STORY:

As a Zephyr OS user I want to be able to read from an existing file, also while the file is read from multiple and write accessed from one other instances.

6.4. Write to files
UID: ZEP-SRS-17-4
STATUS: Draft
TYPE: Functional
COMPONENT: File System
STATEMENT:

Zephyr shall provide write access to the files in the file system.

USER_STORY:

As a Zephyr OS user I want to be able to write to a file either from the beginning of the file or appending at the end.

6.5. Close file
UID: ZEP-SRS-17-5
STATUS: Draft
TYPE: Functional
COMPONENT: File System
STATEMENT:

Zephyr shall provide file close capabilities for files on the file system.

USER_STORY:

As a Zephyr OS user I want to be able to close a file after being finished with my file operations, unlocking any access restrictions.

6.6. Move file
UID: ZEP-SRS-17-6
STATUS: Draft
TYPE: Functional
COMPONENT: File System
STATEMENT:

Zephyr shall provide the capability to move files on the file system.

6.7. Delete file
UID: ZEP-SRS-17-7
STATUS: Draft
TYPE: Functional
COMPONENT: File System
STATEMENT:

Zephyr shall provide file delete capabilities for files on the file system.

USER_STORY:

As a Zephyr OS user I want to be able to delete an existing file.

7. Interrupts

STATEMENT:

SPDX-License-Identifier: Apache-2.0

7.1. Installing static IRQ service routines (ISR).
UID: ZEP-SRS-7-1
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

Zephyr RTOS shall provide a mechanism to initialize a static IRQ service routine (ISR), providing all parameters needed to configure the hardware and software.

7.2. Static IRQ initial status.
UID: ZEP-SRS-7-2
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

The static IRQ shall be initially disabled.

7.3. Installing direct IRQ service routines (ISR).
UID: ZEP-SRS-7-3
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

Zephyr RTOS shall provide a mechanism to initialize a direct IRQ handler, providing all parameters needed to configure the hardware and software.

USER_STORY:

As the developer of low-power and low-latency applications, I need to implement ISRs that avoid the normal interrupt and power management overhead.

7.4. Direct IRQ initial status.
UID: ZEP-SRS-7-4
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

The direct IRQ shall be initially disabled.

7.5. Installing dynamic IRQ service routines (ISR).
UID: ZEP-SRS-7-5
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

Zephyr RTOS shall provide a mechanism to initialize a dynamic IRQ service routine, providing all parameters needed to configure the hardware and software.

7.6. Dynamic IRQ initial status.
UID: ZEP-SRS-7-6
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

The dynamic IRQ shall be initially disabled.

7.7. Uninstalling dynamic IRQ service routines (ISR).
UID: ZEP-SRS-7-7
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

Zephyr RTOS shall provide a mechanism to uninstall a dynamic ISR.

7.8. Global IRQ disable
UID: ZEP-SRS-7-8
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

Zephyr RTOS shall provide a mechanism to Disable all IRQs on a CPU, and return the state the IRQ hardware prior to being disabled.

7.9. Global IRQ enable
UID: ZEP-SRS-7-9
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

Zephyr RTOS shall provide a mechanism to Enable all IRQs on a CPU and return them to thier previous state.

7.10. Specific IRQ disable
UID: ZEP-SRS-7-10
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

Zephyr RTOS shall provide a mechanism to Disable a specified IRQ.

7.11. Specific IRQ enable
UID: ZEP-SRS-7-11
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

Zephyr RTOS shall provide a mechanism to Enable a specified IRQ.

7.12. IRQ Enabled status
UID: ZEP-SRS-7-12
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

Zephyr RTOS shall provide mechanisms that returns the Enabled status of a specified IRQ, where the status is Enabled or Disabled.

7.13. ISR Context status
UID: ZEP-SRS-7-13
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

Zephyr RTOS shall provide mechanisms that returns the execution context, where the context is In-ISR or Not In-ISR.

USER_STORY:

As the developer of functions that may run in either ISR or THREAD context, I need to know the current context to enable condition behavior.

7.14. Multi-level interrupts
UID: ZEP-SRS-7-14
STATUS: Draft
TYPE: Functional
COMPONENT: Interrupts
parent relations:
STATEMENT:

The Zephyr RTOS shall support multi-level preemptive interrupt priorities, when supported by hardware.

8. Logging

STATEMENT:

SPDX-License-Identifier: Apache-2.0

8.1. Dedicated Logging Thread Support
UID: ZEP-SRS-11-1
STATUS: Draft
TYPE: Functional
COMPONENT: Logging
STATEMENT:

The Zephyr RTOS shall support isolation of logging from other functionality.

USER_STORY:

As a Zephyr RTOS user I want to be able to configure logging of events so the execution of logging activities does have no or only a minimal impact to the timing behaviour of my application.

8.2. Logs available for post processing
UID: ZEP-SRS-11-2
STATUS: Draft
TYPE: Functional
COMPONENT: Logging
STATEMENT:

The Zephyr RTOS logging shall produce logs that are capable of being post processed.

USER_STORY:

As a Zephyr RTOS user I want the logging information to be stored in a format which allows to be read possibly converted or displayed by COTS tools.

8.3. Formatting log messages
UID: ZEP-SRS-11-3
STATUS: Draft
TYPE: Functional
COMPONENT: Logging
STATEMENT:

The Zephyr RTOS logging shall support formatting of log messages to enable filtering.

USER_STORY:

As a Zephyr RTOS user I want to be able my application to format texts (printf alike) into the log message.

8.4. Logging Filtering Support
UID: ZEP-SRS-11-4
STATUS: Draft
TYPE: Functional
COMPONENT: Logging
STATEMENT:

The Zephyr RTOS logging system shall support filtering based on severity level.

USER_STORY:

As a Zephyr RTOS user I want to be able to distinguish between different severity level for my log messages (e.g. DEBUG, INFO, WARN, ERROR, PANIC).

8.5. Multiple Backend Logging Support
UID: ZEP-SRS-11-5
STATUS: Draft
TYPE: Functional
COMPONENT: Logging
STATEMENT:

The Zephyr RTOS shall support logging messages to multiple system resources.

USER_STORY:

As a Zephyr RTOS user I want to be able to simultaneously log to different channels which may store / redirect the information on / to different hardware (EEPROM, Flash, FRAM, UART, Ethernet, USB etc.).

8.6. Deferred Logging Support
UID: ZEP-SRS-11-6
STATUS: Draft
TYPE: Functional
COMPONENT: Logging
STATEMENT:

The Zephyr RTOS shall support deferred logging (TODO: need more detail about the constraints and limits on what can be deferred).

USER_STORY:

As a Zephyr RTOS user I want a minimal influence of logging activities to the timing behaviour of my application. Time consuming logging threads shall be done in the background.

9. Memory protection

STATEMENT:

SPDX-License-Identifier: Apache-2.0

9.1. Memory Protection
UID: ZEP-SRS-8-1
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall support memory protection features to isolate a thread's memory region.

USER_STORY:

As a Zephyr RTOS user I want memory to be allocated and protected to my application threads preventing mistakenly access to foreign memory as far as the hardware allows.

9.2. Granting access to kernel objects
UID: ZEP-SRS-8-2
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall provide a mechanism to grant user threads access to kernel objects.

USER_STORY:

As a Zephyr RTOS user I want, from the user space, under certain conditions, access to kernel objects.

9.3. Separation between user and kernel threads for memory access
UID: ZEP-SRS-8-3
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall be able to differentiate between user threads and kernel threads for memory access.

USER_STORY:

As a Zephyr RTOS user I want, from the kernel space, unconditioned access to kernel objects.

9.4. Safely handle unimplemented calls or invalid system calls
UID: ZEP-SRS-8-4
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall have a defined behaviour when an invocation of an unimplemented system call is made.

USER_STORY:

As a Zephyr RTOS user I want Zephyr OS to indicate any unimplemented system call by an appropriate error message.

9.5. Response to invalid system call IDs
UID: ZEP-SRS-8-5
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall have a defined behaviour when an invalid system call ID is used.

USER_STORY:

As a Zephyr RTOS user I want Zephyr OS to indicate invalid system call by an appropriate error message.

9.6. Prevent user threads creating higher priority threads
UID: ZEP-SRS-8-6
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall prevent user threads from creating new threads that are higher priority than the caller.

9.7. Revoking threads permissions on a kernel object
UID: ZEP-SRS-8-7
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall support revoking permission to a kernel object. User mode threads may only revoke their own access to an object.

USER_STORY:

As a Zephyr RTOS user I want to be protected against other user threads changing access to kernel objects of my thread.

9.8. Prevent user threads creating supervisor threads
UID: ZEP-SRS-8-8
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall prevent user threads from creating kernel threads.

USER_STORY:

As a Zephyr RTOS user I want to be protected against user threads creating higher privileged kernel/supervisor threads.

9.9. Reduced Privilege Level Threads
UID: ZEP-SRS-8-9
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall allow the creation of threads that run in reduced privilege level.

USER_STORY:

As a Zephyr RTOS user I want to be able to create lower privileged threads than my own.

9.10. User Mode Threads Performing Privileged Operations
UID: ZEP-SRS-8-10
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall provide system calls to allow user mode threads to perform privileged operations.

USER_STORY:

As a Zephyr RTOS user I want to be able to perform privileged operations in the kernel mode through a well defined interface.

9.11. User mode handling of detected stack overflow
UID: ZEP-SRS-8-11
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall support a defined mechanism for user mode handling a of detected stack overflow.

USER_STORY:

As a Zephyr RTOS user I want, when a stack overflow is detected, to be able to implement a graceful, application defined handling of the exception.

9.12. Stack Overflow Detection
UID: ZEP-SRS-8-12
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall support detection of stack overflows.

USER_STORY:

As a Zephyr RTOS user I want to get an indication when a stack overflow occurs at least during debugging / the development phase, and for safety applications also in a release version of my application.

9.13. Boot Time Memory Access Policy
UID: ZEP-SRS-8-13
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall support configurable access to memory during boot time.

9.14. System Call Handler Functions
UID: ZEP-SRS-8-14
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall provide helper functions for system call handler functions to validate the inputs passed in from user mode before invoking the implementation function to protect the kernel.

USER_STORY:

As a Zephyr RTOS user I want Zepyhr OS to validate system call parameters passed from the user mode to the kernel mode to avoid crashes and undefined behaviour.

9.15. System Call C strings in user mode
UID: ZEP-SRS-8-15
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall support system calls to be able to safely accept C strings passed in from user mode.

USER_STORY:

As a Zephyr RTOS user I want Zepyhr OS to validate system call string type parameters passed from the user mode to the kernel mode to avoid crashes and undefined behaviour.

e.g.

  • verify the string length is smaller or equal to the syscalls defined max.
  • verify that the length type does not overflow when allocating one more byte ???
9.16. Tracking kernel objects in used by user mode threads
UID: ZEP-SRS-8-16
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall track kernel objects that are used by user mode threads.

Note: this means Zephyr shall track the resources used by the user mode thread (associate this with a user story).

9.17. Granting threads access to specific memory
UID: ZEP-SRS-8-17
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall have an interface to request access to specific memory after initial allocation.

USER_STORY:

As a Zephyr RTOS user I want to be able to request read-only or read-write access to a dedicated memory area/pool during runtime.

9.18. Assigning memory pools to act as a thread resource pool
UID: ZEP-SRS-8-18
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Protection
STATEMENT:

The Zephyr RTOS shall support assigning a memory pool to act as that thread's resource pool.

USER_STORY:

As a Zephyr RTOS user I want to be able, during runtime from the kernel, to request a memory area/pool which is exclusively available to the requesting thread protected against access from other threads.

10. Memory Objects

STATEMENT:

SPDX-License-Identifier: Apache-2.0

10.1. Dynamic Memory Allocation
UID: ZEP-SRS-9-1
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Objects
STATEMENT:

The Zephyr RTOS shall allow threads to dynamically allocate variable-sized memory regions from a specified range of memory.

USER_STORY:

As a Zephyr RTOS user I want my application to be able to dynamically allocate memory of a application defined size.

10.2. Memory Slab Object
UID: ZEP-SRS-9-2
STATUS: Draft
TYPE: Functional
COMPONENT: Memory Objects
STATEMENT:

The Zephyr RTOS shall allow threads to dynamically allocate fixed-sized memory regions from a specified range of memory.

USER_STORY:

As a Zephyr RTOS user I want a most efficient and least fragmentation prone dynamic memory allocation mechanism.

11. Data Passing

STATEMENT:

SPDX-License-Identifier: Apache-2.0

11.1. Traditional FIFO Queue
UID: ZEP-SRS-15-1
STATUS: Draft
TYPE: Functional
COMPONENT: Data Passing
STATEMENT:

The Zephyr RTOS shall provide a kernel object that implements a traditional first in, first out (FIFO) queue, allowing threads and ISRs to add and remove a limited number of 32-bit data values.

USER_STORY:

As a Zephyr RTOS user I want to be able to exchange 1 to N data objects between different threads and ISR in a thread-safe manner with a first-in-first-out (queue) behaviour.

11.2. Traditional LIFO queue
UID: ZEP-SRS-15-2
STATUS: Draft
TYPE: Functional
COMPONENT: Data Passing
STATEMENT:

The Zephyr RTOS shall provide a kernel object that implements a traditional last in, first out (LIFO) queue, allowing threads and ISRs to add and remove a limited number of 32-bit data values.

USER_STORY:

As a Zephyr RTOS user I want to be able to exchange 1 to N data objects between different threads and ISR in a thread-safe manner with a last-in-first-out (stack) behaviour.

12. Mutex

STATEMENT:

SPDX-License-Identifier: Apache-2.0

12.1. Mutex Kernel Object
UID: ZEP-SRS-6-1
STATUS: Draft
TYPE: Functional
COMPONENT: Mutex
STATEMENT:

The Zephyr RTOS shall support resource synchronization. (Note synchronization can be for memory access, and mutex may be one implementation, but not the only one).

USER_STORY:

As a Zephyr RTOS user I want to be able to sychonize threads when accessing common resources, where the thread shall have the option to: - wait eternally until the resources becomes available. - immediately return with a negative message if the resource is not available and allow the thread to continue. - wait for a given time for the resource to become available or return with a negative message.

13. Semaphores

STATEMENT:

SPDX-License-Identifier: Apache-2.0

13.1. Counting Semaphore Definition At Compile Time
UID: ZEP-SRS-5-1
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to define and initialize a semaphore at compile time.

13.2. Counting Semaphore Definition At Run Time
UID: ZEP-SRS-5-2
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to define and initialize a semaphore at runtime.

13.3. Maximum limit of a semaphore
UID: ZEP-SRS-5-3
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
STATEMENT:

The Zephyr RTOS shall define the maximum limit of a semaphore when the semaphore is used for counting purposes and does not have an explicit limit.

13.4. Initialialization with maximum count value
UID: ZEP-SRS-5-4
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

When initializing a counting semaphore, the maximum permitted count a semaphore can have shall be set.

13.5. Initial semaphore value
UID: ZEP-SRS-5-5
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

When initializing a counting semaphore, the initial semaphore value shall be set.

13.6. Semaphore acquisition mechanism
UID: ZEP-SRS-5-6
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism allowing threads to acquire a semaphore.

13.7. Semaphore acquisition with count greater than zero
UID: ZEP-SRS-5-7
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

While the semaphore's count is greater than zero, the requesting thread shall acquire the semaphore and decrement its count.

13.8. Semaphore acquisition with zero count
UID: ZEP-SRS-5-8
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

While the semaphore's count is zero, the requesting thread shall be blocked until the semaphore is released by another thread.

13.9. Semaphore acquisition timeout
UID: ZEP-SRS-5-9
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

When attempting to acquire a semaphore, the Zephyr RTOS shall accept options that specify timeout periods, allowing threads to set a maximum wait time for semaphore acquisition.

13.10. Semaphore acquisition timeout error handling
UID: ZEP-SRS-5-10
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

When attempting to acquire a semaphore, where the semaphore is not acquired within the specified time, the Zephyr RTOS shall return an error indicating a timeout.

13.11. Semaphore acquisition no wait error handling
UID: ZEP-SRS-5-11
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

When attempting to acquire a semaphore, where the current count is zero and no timeout time was provided, the Zephyr RTOS shall return an error indicating the semaphore is busy.

13.12. Semaphore release
UID: ZEP-SRS-5-12
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism allowing threads to release a semaphore.

13.13. Semaphore release
UID: ZEP-SRS-5-13
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

The Zephyr RTOS shall increment the semaphore's count upon release.

13.14. Semaphore release with priority inheritance
UID: ZEP-SRS-5-14
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

When there are threads waiting on the semaphore, the highest-priority waiting thread shall be unblocked and acquire the semaphore.

13.15. Checking semaphore count
UID: ZEP-SRS-5-15
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism for threads to check the current count of a semaphore without acquiring it.

13.16. Semaphore reset
UID: ZEP-SRS-5-16
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism that resets the semaphore count to zero.

13.17. Semaphore acquisitions abort after reset
UID: ZEP-SRS-5-17
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

When a semaphore is reset, the Zephyr RTOS shall abort all existing acquisitions of the semaphore returning a resource contention error code.

13.18. Semaphore Initialization Option Validation
UID: ZEP-SRS-5-18
STATUS: Draft
TYPE: Functional
COMPONENT: Semaphore
parent relations:
STATEMENT:

When initializing a counting semaphore, where the maximum permitted count of a semaphore is invalid, then the Zephyr RTOS shall return an error indicating invalid values.

14. Power Management

STATEMENT:

SPDX-License-Identifier: Apache-2.0

14.1. Power State Control
UID: ZEP-SRS-13-1
STATUS: Draft
TYPE: Functional
COMPONENT: Power Management
STATEMENT:

The Zephyr RTOS shall provide control over changes to system power states.

USER_STORY:

See ZEP104 + When the power state is changed I want to get an notification in order for specific parts of my application to react accordingly.

14.2. Power Management
UID: ZEP-SRS-13-2
STATUS: Draft
TYPE: Functional
COMPONENT: Power Management
STATEMENT:

TBD

14.3. Notification of changes to system power states
UID: ZEP-SRS-13-3
STATUS: Draft
TYPE: Functional
COMPONENT: Power Management
STATEMENT:

The Zephyr RTOS shall provide notification of changes to system power states.

15. Thread Communication

STATEMENT:

SPDX-License-Identifier: Apache-2.0

15.1. Exchanging data between threads
UID: ZEP-SRS-3-1
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Communication
STATEMENT:

The Zephyr RTOS shall provide a mechanism for exchanging data between threads.

USER_STORY:

(Note: copying data may be needed here - what is Zephyr doing? is it configurable?)

15.2. Waiting for results during communication
UID: ZEP-SRS-3-2
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Communication
STATEMENT:

The Zephyr RTOS shall provide mechanisms to enable waiting for results during communication between threads. (NOTE: waiting for results is really bad and dangerous, want to avoid if at all possible).

USER_STORY:

=N73

15.3. Poll Operation Support
UID: ZEP-SRS-3-3
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Communication
STATEMENT:

The Zephyr RTOS shall support a poll operation which enables waiting concurrently for any one of multiple conditions to be fulfilled.

USER_STORY:

As a Zephyr RTOS user I want my thread to wait for one of several defined events to occur and only continue when one of them has occurred.

15.4. Pipe Communication Primitive
UID: ZEP-SRS-3-4
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Communication
STATEMENT:

The Zephyr RTOS shall provide a communication primitive that allows a thread to transfer a block of data to another thread.

USER_STORY:

As a Zephyr RTOS user I want to send a byte stream from one thread to another in a thread-safe manner.

15.5. Message Queue
UID: ZEP-SRS-3-5
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Communication
STATEMENT:

The Zephyr RTOS shall provide a a communication primitive that allow threads and ISRs to asynchronously exchange fixed-size data items.

15.6. Mailbox Kernel Primitive
UID: ZEP-SRS-3-6
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Communication
STATEMENT:

The Zephyr RTOS shall provide a communication primitive that allows threads to exchange messages of varying sizes asynchronously or synchronously.

USER_STORY:

As a Zephyr RTOS user I want a sending thread to deposit a message into the mailbox, and a receiving thread to be able to retrieve the message at its convenience. This allows for asynchronous communication, where threads do not need to synchronize their execution explicitly.

16. Thread Scheduling

STATEMENT:

SPDX-License-Identifier: Apache-2.0

16.1. Thread Scheduling

16.1.1. Support operation on more than one CPU
UID: ZEP-SRS-2-1
STATUS: Draft
TYPE: Functional
COMPONENT: Multi Core
STATEMENT:

The Zephyr RTOS shall support operation on more than one physical CPU sharing the same kernel state.

16.1.2. Running threads on specific CPUs
UID: ZEP-SRS-2-2
STATUS: Draft
TYPE: Functional
COMPONENT: Multi Core
STATEMENT:

The Zephyr RTOS shall provide an interface for running threads on specific sets of CPUs ( default is 1 CPU).

USER_STORY:

As a Zephyr RTOS user I want Zephyr OS to be able to specify the CPU core or the set of CPU cores on which a thread shall be executed.

16.1.3. Exclusion between physical CPUs
UID: ZEP-SRS-2-3
STATUS: Draft
TYPE: Functional
COMPONENT: Multi Core
STATEMENT:

The Zephyr RTOS shall provide an interface for mutual exclusion between multiple physical CPUs.

USER_STORY:

As a Zephyr RTOS user I want Zephyr OS to provide synchronization mechanisms between the CPU cores and the access to common resources.

16.2. Thread Scheduling

16.2.1. Scheduling a thread based on an event
UID: ZEP-SRS-2-4
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Scheduling
parent relations:
STATEMENT:

The Zephyr RTOS shall provide an interface to schedule a thread based on an event.

USER_STORY:

As a Zephyr RTOS user, I want to be able to execute work which reacts on events and interrupts the current executed work.

16.2.2. Deadline Scheduling Priorities
UID: ZEP-SRS-2-5
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Scheduling
STATEMENT:

The Zephyr RTOS shall organize running threads by earliest deadline first priority.

USER_STORY:

As a Zephyr RTOS user, I want to be able to schedule threads by earliest deadline first.

16.2.3. Work Queue utility capable of running preemptible work items
UID: ZEP-SRS-2-6
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Scheduling
STATEMENT:

The Zephyr RTOS shall provide a thread-pooled work queue utility capable of running preemptible work items with specific scheduler priorities.

USER_STORY:

As a Zephyr RTOS user, I want to be able to add work items in a thread work queue with different priorities and these shall be scheduled according their priorities.

16.2.4. Run user supplied functions in-order in a separate thread(s)
UID: ZEP-SRS-2-7
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Scheduling
STATEMENT:

The Zephyr RTOS shall provide an interface for running user-supplied functions.

USER_STORY:

As a Zephyr RTOS user, I want to be able to run functions in-order in a separated thread/threads.

16.2.5. Organize running threads into a fixed list
UID: ZEP-SRS-2-8
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Scheduling
STATEMENT:

The Zephyr RTOS shall organize running threads into a fixed list of numeric priorities.

USER_STORY:

As a Zephyr RTOS user, I want that the OS organize running threads in a fixed list of numeric priorities.

16.2.6. Preemption support
UID: ZEP-SRS-2-9
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Scheduling
STATEMENT:

The Zephyr RTOS shall support preemption of a running thread by a higher priority thread.

USER_STORY:

As a Zephyr RTOS user, I want that the OS preempt running threads by a thread with higher priority.

16.2.7. Un-preemptible thread priorities
UID: ZEP-SRS-2-10
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Scheduling
STATEMENT:

The Zephyr RTOS shall support thread priorities which cannot be preempted by other user threads.

USER_STORY:

As a Zephyr RTOS user, I want to be able to configure thread prioritizes which cannot be preempted by other user threads.

16.2.8. Time sharing of CPU resources
UID: ZEP-SRS-2-11
STATUS: Draft
TYPE: Functional
COMPONENT: Thread Scheduling
STATEMENT:

The Zephyr RTOS shall support time sharing of CPU resources among threads of the same priority.

USER_STORY:

As a Zephyr RTOS user, I want to be able to configure my RTOS in the way, that the CPU resources are shared evenly among executed threads of the same priority.

17. Threads

STATEMENT:

SPDX-License-Identifier: Apache-2.0

17.1. Creating threads
UID: ZEP-SRS-1-1
STATUS: Draft
TYPE: Functional
COMPONENT: Threads
parent relations:
STATEMENT:

The Zephyr RTOS shall provide an interface to create (start) a thread.

17.2. Setting thread priority
UID: ZEP-SRS-1-2
STATUS: Draft
TYPE: Functional
COMPONENT: Threads
parent relations:
STATEMENT:

The Zephyr RTOS shall provide an interface to set a thread's priority.

17.3. Suspending a thread
UID: ZEP-SRS-1-3
STATUS: Draft
TYPE: Functional
COMPONENT: Threads
parent relations:
STATEMENT:

The Zephyr RTOS shall provide an interface to suspend a thread.

17.4. Resuming a suspended thread
UID: ZEP-SRS-1-4
STATUS: Draft
TYPE: Functional
COMPONENT: Threads
parent relations:
STATEMENT:

The Zephyr RTOS shall provide an interface to resume a suspended thread.

17.5. Resuming a suspended thread after a timeout
UID: ZEP-SRS-1-5
STATUS: Draft
TYPE: Functional
COMPONENT: Threads
parent relations:
STATEMENT:

The Zephyr RTOS shall provide an interface to resume a suspended thread after a timeout.

17.6. Deleting a thread
UID: ZEP-SRS-1-6
STATUS: Draft
TYPE: Functional
COMPONENT: Threads
parent relations:
STATEMENT:

The Zephyr RTOS shall provide an interface to delete (end) a thread.

17.7. Thread states
UID: ZEP-SRS-1-7
STATUS: Draft
TYPE: Functional
COMPONENT: Threads
parent relations:
STATEMENT:

Threads shall have different states to fulfill the Life-cycle of a thread

USER_STORY:

As a Zephyr RTOS user, I want to know in what state a specific thread is.

17.8. Thread stack objects
UID: ZEP-SRS-1-8
STATUS: Draft
TYPE: Functional
COMPONENT: Threads
parent relations:
STATEMENT:

Every Thread shall have it's own stack.

USER_STORY:

As a Zephyr RTOS user I want to be able to configure the stack size of a thread. And every thread shall have it's own dedicated stack.

17.9. Thread privileges
UID: ZEP-SRS-1-9
STATUS: Draft
TYPE: Functional
COMPONENT: Threads
parent relations:
STATEMENT:

The Zephyr RTOS shall provide an interface to create threads with defined privilege.

17.10. Scheduling multiple threads
UID: ZEP-SRS-1-10
STATUS: Draft
TYPE: Functional
COMPONENT: Threads
parent relations:
STATEMENT:

The Zephyr RTOS shall provide an interface to schedule multiple threads.

17.11. Thread Options
UID: ZEP-SRS-1-11
STATUS: Draft
TYPE: Functional
COMPONENT: Threads
parent relations:
STATEMENT:

The Zephyr RTOS shall support a set of thread options.

USER_STORY:

As a Zephyr RTOS user, I want to be able to pass specific option to a thread.

17.12. Thread Custom Data
UID: ZEP-SRS-1-12
STATUS: Draft
TYPE: Functional
COMPONENT: Threads
parent relations:
STATEMENT:

Every thread shall have a custom data area.

USER_STORY:

As a Zephyr RTOS user, I want to be able to set a thread specific custom area for every thread I create and which can be used only by the thread itself or the can be used by the application

18. Timers

STATEMENT:

SPDX-License-Identifier: Apache-2.0

18.1. Timer definition at compile time
UID: ZEP-SRS-4-1
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to define and statically (i.e. compile time) initialize timers.

18.2. Timer expiry function
UID: ZEP-SRS-4-2
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

When initializing a timer, the Zephyr RTOS shall support setting a function that gets called when the timer expires.

18.3. Timer stop function
UID: ZEP-SRS-4-3
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

When initializing a timer, the Zephyr RTOS shall support setting a function that gets called when a running timer is stopped.

18.4. Timer definition at run time
UID: ZEP-SRS-4-4
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to define and initialize timers at run time.

18.5. Timer start
UID: ZEP-SRS-4-5
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to start a timer for a specific duration and periodicity.

18.6. Timer stop
UID: ZEP-SRS-4-6
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to stop a running timer.

18.7. Timer status
UID: ZEP-SRS-4-7
STATUS: Draft
TYPE: Non-Functional
COMPONENT: Timers
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to read the number of times a timer has expired and then reset this number to 0.

18.8. Timer status reinitialization
UID: ZEP-SRS-4-8
STATUS: Draft
TYPE: Non-Functional
COMPONENT: Timers
parent relations:
STATEMENT:

When a timer is initialized, started or synchronized to a thread, the Zephyr RTOS shall reset the timer number of times it has expired to 0.

18.9. Timer thread synchronization
UID: ZEP-SRS-4-9
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to synchronize a thread to a timer and then block the thread execution until any of the following conditions is satisfied: - The timer is stopped - The timer number of times it has expired is superior to 0

18.10. Timer next expiration time in system ticks
UID: ZEP-SRS-4-10
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to get a timer's next expiration time in system ticks.

18.11. Timer remaining time until expiration in system ticks
UID: ZEP-SRS-4-11
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to get a timer's remaining time until its next expiry in system ticks.

18.12. Timer remaining time until expiration in milliseconds
UID: ZEP-SRS-4-12
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to get the timer's remaining time until its next expiry in milliseconds.

18.13. Timer set user data
UID: ZEP-SRS-4-13
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

The Zephyr RTOS shall support adding user defined data to a timer.

18.14. Timer get user data
UID: ZEP-SRS-4-14
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

The Zephyr RTOS shall support retrieving user defined data from a timer.

18.15. Timer expire functions in interrupt context
UID: ZEP-SRS-4-15
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
parent relations:
STATEMENT:

When a timer expiry function is called, the Zephyr RTOS shall do so in the interrupt context.

19. Tracing

STATEMENT:

SPDX-License-Identifier: Apache-2.0

19.1. Initializing a trace
UID: ZEP-SRS-10-1
STATUS: Draft
TYPE: Functional
COMPONENT: Tracing
STATEMENT:

Zephyr shall provide an interface to initialize a trace.

19.2. Triggering a trace
UID: ZEP-SRS-10-2
STATUS: Draft
TYPE: Functional
COMPONENT: Tracing
STATEMENT:

Zephyr shall provide an interface to trigger a trace.

19.3. Dumping trace results
UID: ZEP-SRS-10-3
STATUS: Draft
TYPE: Functional
COMPONENT: Tracing
STATEMENT:

Zephyr shall provide an interface to dump results from a trace.

19.4. Removing trace data
UID: ZEP-SRS-10-4
STATUS: Draft
TYPE: Functional
COMPONENT: Tracing
STATEMENT:

Zephyr shall provide an interface to remove trace data.

19.5. Tracing Object Identification
UID: ZEP-SRS-10-5
STATUS: Draft
TYPE: Functional
COMPONENT: Tracing
STATEMENT:

Zephyr shall provide an interface to identify the objects being traced.

USER_STORY:

As a Zepyhr OS user, I want to be able to give each object which I create a name / label in order to be able to identify them in a trace log.

19.6. Tracing Non-Interference
UID: ZEP-SRS-10-6
STATUS: Draft
TYPE: Functional
COMPONENT: Tracing
STATEMENT:

Zepyhr shall prevent the tracing functionality from interfering with normal operations.

USER_STORY:

As a Zepyhr OS user, I want that the trace functionality do not interfere or slow down the operation system functionality.

20. Condition Variables

20.1. Dynamic initialization of condition variables
UID: ZEP-SRS-21-1
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to define and initialize a condition variable dynamically (at runtime).

20.2. Static initialization of condition variables
UID: ZEP-SRS-21-2
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to define and initialize a condition variable statically (at compile time).

20.3. Signal one waiting thread
UID: ZEP-SRS-21-3
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to signal the highest priorite waiting thread when a condition is met.

20.4. Signal multiple waiting threads
UID: ZEP-SRS-21-4
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to signal all waiting threads when a condition is met.

20.5. Wait on a condition variable
UID: ZEP-SRS-21-5
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism for a thread to wait on a condition variable.

20.6. Wait timeout on a condition variable
UID: ZEP-SRS-21-6
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
parent relations:
STATEMENT:

When waiting on a condition variable, the thread shall specify a timeout value.

20.7. Wait timeout occurence
UID: ZEP-SRS-21-7
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
parent relations:
STATEMENT:

When a timeout occurs while waiting on a condition variable, the thread shall be unblocked and a timeout error shall be returned.

20.8. Release mutex on wait
UID: ZEP-SRS-21-8
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
parent relations:
STATEMENT:

If a thread is waiting on a condition variable, the thread shall release the current owned mutex independently.

20.9. Unblock a waiting thread
UID: ZEP-SRS-21-9
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
parent relations:
STATEMENT:

henever some thread signals a condition variable the Zephyr RTOS shall unblock the highest priority thread currently waiting for this condition variable.

21. Tracing

21.1. Queue definition at compile time
UID: ZEP-SRS-20-1
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to define and initialize a queue at compile time.

21.2. Queue definition at run time.
UID: ZEP-SRS-20-2
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to define and initialize a queue at run time.

21.3. Queue enqueue item to the back
UID: ZEP-SRS-20-3
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to enqueue a data item to the back of a queue (i.e. append).

21.4. Queue enqueue item to the front
UID: ZEP-SRS-20-4
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to enqueue a data item to the front of a queue (i.e. prepend).

21.5. Queue remove item
UID: ZEP-SRS-20-5
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to remove a specific data item from a queue.

21.6. Queue get and dequeue item from front
UID: ZEP-SRS-20-6
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to get and dequeue a data item from the front of a queue, within a timeout.

21.7. Queue empty check
UID: ZEP-SRS-20-7
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to check if a queue is empty.

21.8. Queue peek item at back
UID: ZEP-SRS-20-8
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to peek at the data data item at the back of a queue.

21.9. Queue peek item at front
UID: ZEP-SRS-20-9
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to peek at the data data item at the front of a queue.

21.10. Queue insert
UID: ZEP-SRS-20-10
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to insert a data item behind another specific data item in a queue.

21.11. Queue append item list to the back
UID: ZEP-SRS-20-11
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to append a list of data items to the back of a queue.

21.12. Queue append and empty item list to the back
UID: ZEP-SRS-20-12
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to append a list of data items to the back of a queue and then empty the list.

21.13. Queue append unique data item
UID: ZEP-SRS-20-13
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to append a data item uniquely to the queue.

21.14. Queue implicit memory allocation
UID: ZEP-SRS-20-14
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a dedicated mechanism to implicite allocate memory from a thread when appending data items to a queue.

22. Tracing

22.1. LIFO definition at compile time
UID: ZEP-SRS-23-1
STATUS: Draft
TYPE: Functional
COMPONENT: LIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to define and initialize a LIFO at compile time.

22.2. LIFO enqueue item to the back
UID: ZEP-SRS-23-2
STATUS: Draft
TYPE: Functional
COMPONENT: LIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to enqueue a data item to the back of a LIFO (i.e. prepend).

22.3. LIFO implicit memory allocation
UID: ZEP-SRS-23-3
STATUS: Draft
TYPE: Functional
COMPONENT: LIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to allocate memory from a thread when enqueuing data items to a LIFO.

22.4. LIFO get and dequeue item from front
UID: ZEP-SRS-23-4
STATUS: Draft
TYPE: Functional
COMPONENT: LIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to get and dequeue a data item from the back of a LIFO, within a timeout.

22.5. Queue definition at compile time
UID: ZEP-SRS-23-5
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to define and initialize a LIFO at compile time.

23. Tracing

23.1. FIFO definition at compile time
UID: ZEP-SRS-24-1
STATUS: Draft
TYPE: Functional
COMPONENT: FIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to define and initialize a FIFO at compile time.

23.2. FIFO cancel waiting thread
UID: ZEP-SRS-24-2
STATUS: Draft
TYPE: Functional
COMPONENT: FIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism for the first thread waiting to get and dequeue a data item to return as if the timeout had expired.

23.3. FIFO enqueue item to the back
UID: ZEP-SRS-24-3
STATUS: Draft
TYPE: Functional
COMPONENT: FIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to enqueue a data item to the back of a FIFO (i.e. append).

23.4. FIFO implicit memory allocation
UID: ZEP-SRS-24-4
STATUS: Draft
TYPE: Functional
COMPONENT: FIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to allocate memory from a thread when enqueuing data items to a FIFO.

23.5. FIFO append item list to the back
UID: ZEP-SRS-24-5
STATUS: Draft
TYPE: Functional
COMPONENT: FIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to append a list of data items to the back of a FIFO.

23.6. FIFO append and empty item list to the back
UID: ZEP-SRS-24-6
STATUS: Draft
TYPE: Functional
COMPONENT: FIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to append a list of data items to the back of a FIFO and then empty the list.

23.7. FIFO get and dequeue item from front
UID: ZEP-SRS-24-7
STATUS: Draft
TYPE: Functional
COMPONENT: FIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to get and dequeue a data item from the front of a FIFO, within a timeout.

23.8. FIFO empty check
UID: ZEP-SRS-24-8
STATUS: Draft
TYPE: Functional
COMPONENT: FIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to check if a FIFO is empty.

23.9. FIFO peek item at front
UID: ZEP-SRS-24-9
STATUS: Draft
TYPE: Functional
COMPONENT: FIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to peek at the data data item at the front of a FIFO.

23.10. FIFO peek item at back
UID: ZEP-SRS-24-10
STATUS: Draft
TYPE: Functional
COMPONENT: FIFOs
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to peek at the data item at the back of a FIFO.

23.11. Queue definition at compile time
UID: ZEP-SRS-24-11
STATUS: Draft
TYPE: Functional
COMPONENT: Queues
parent relations:
STATEMENT:

The Zephyr RTOS shall provide a mechanism to define and initialize a FIFO at compile time.