Zephyr Project Requirements
Zephyr System Requirements

SPDX-License-Identifier: Apache-2.0

ZEP-SYRS-1
1. Architecture Layer Interface UID: ZEP-SYRS-1 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Child): STATEMENT:

The Zephyr RTOS shall provide a framework to communicate with a set of hardware architectural services.

USER_STORY:

As a Zephyr RTOS user I want to be able to easily switch my application to a different MCU architecture (x86, ARM Cortex-M/A, RISCV etc.).

  • ZEP-SRS-19-1
    1.1. Atomic Operations UID: ZEP-SRS-19-1 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide an interface to access memory while ensuring mutual exclusion.

    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.

  • ZEP-SRS-19-2
    1.2. Thread Context Switching UID: ZEP-SRS-19-2 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): 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.

  • ZEP-SRS-19-3
    1.3. Software Exceptions UID: ZEP-SRS-19-3 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): 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.

  • ZEP-SRS-19-4
    1.4. Processor Mode Support UID: ZEP-SRS-19-4 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): 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.

  • ZEP-SYRS-2
    2. Support multiprocessor management UID: ZEP-SYRS-2 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall support symmetric multiprocessing on multiple cores.

    USER_STORY:

    As a Zephyr RTOS user I want to use Zephyr OS on multi core (SMP-)MCUs/MPUs.

ZEP-SYRS-2
2. Support multiprocessor management UID: ZEP-SYRS-2 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

The Zephyr RTOS shall support symmetric multiprocessing on multiple cores.

USER_STORY:

As a Zephyr RTOS user I want to use Zephyr OS on multi core (SMP-)MCUs/MPUs.

ZEP-SYRS-3
3. Support Subset of Standard C Library UID: ZEP-SYRS-3 STATUS: Draft TYPE: Functional COMPONENT: C Library RELATIONS (Child): STATEMENT:

The Zephyr RTOS shall support a subset of the standard C library.

USER_STORY:

As a Zephyr RTOS user I want to have a selection of standard C library implementations e.g. a full extend and a minimal with a smaller footprint or a particular fast executing implementation.

  • ZEP-SRS-18-1
    2.1. Formatted output UID: ZEP-SRS-18-1 STATUS: Draft TYPE: Functional COMPONENT: C Library RELATIONS (Parent): 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.

  • ZEP-SRS-18-2
    2.2. Floating Point Math Support UID: ZEP-SRS-18-2 STATUS: Draft TYPE: Functional COMPONENT: C Library RELATIONS (Parent): 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.

  • ZEP-SRS-18-3
    2.3. Boolean Primitives Support UID: ZEP-SRS-18-3 STATUS: Draft TYPE: Functional COMPONENT: C Library RELATIONS (Parent): 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.

  • ZEP-SRS-18-4
    2.4. Standard Unix time interface UID: ZEP-SRS-18-4 STATUS: Draft TYPE: Functional COMPONENT: C Library RELATIONS (Parent): 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.

  • ZEP-SRS-18-5
    2.5. Strings support UID: ZEP-SRS-18-5 STATUS: Draft TYPE: Functional COMPONENT: C Library RELATIONS (Parent): 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.

  • ZEP-SRS-18-6
    2.6. Moving/copying regions of memory UID: ZEP-SRS-18-6 STATUS: Draft TYPE: Functional COMPONENT: C Library RELATIONS (Parent): 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.

  • ZEP-SRS-18-7
    2.7. I/O based interface UID: ZEP-SRS-18-7 STATUS: Draft TYPE: Functional COMPONENT: C Library RELATIONS (Parent): 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.

  • ZEP-SRS-18-8
    2.8. C99 integer types UID: ZEP-SRS-18-8 STATUS: Draft TYPE: Functional COMPONENT: C Library RELATIONS (Parent): 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.

  • ZEP-SRS-18-9
    2.9. Standard System Error Numbers (IEEE Std 1003.1-2017) UID: ZEP-SRS-18-9 STATUS: Draft TYPE: Functional COMPONENT: C Library RELATIONS (Parent): 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.

  • ZEP-SRS-18-10
    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 RELATIONS (Parent): STATEMENT:

    The set of C Library functions required by Zephyr shall 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.

  • ZEP-SRS-18-11
    2.11. Support external C libraries documentation in Zephyr Safety Manual UID: ZEP-SRS-18-11 STATUS: Draft TYPE: Functional COMPONENT: C Library RELATIONS (Parent): STATEMENT:

    The Zephyr Safety Manual shall 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.

ZEP-SYRS-4
4. Device Driver Abstraction UID: ZEP-SYRS-4 STATUS: Draft TYPE: Functional COMPONENT: Device Drivers RELATIONS (Child): STATEMENT:

The Zephyr RTOS shall provide a framework for managing device drivers and peripherals.

USER_STORY:

As a Zephyr RTOS user I want my application to be portable between different MCU architectures (ARM Cortex-M/A, Intel x86, RISCV etc.) and MCU vendors (STM, NXP, Intel, etc.) without having to change the MCU peripherals access.

  • ZEP-SRS-14-1
    3.1. Device Driver Abstraction UID: ZEP-SRS-14-1 STATUS: Draft TYPE: Functional COMPONENT: Device Driver API RELATIONS (Parent): 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.

  • ZEP-SRS-14-2
    3.2. Expose kernel to hardware interrupts UID: ZEP-SRS-14-2 STATUS: Draft TYPE: Functional COMPONENT: Device Driver API RELATIONS (Parent): 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).

ZEP-SYRS-5
5. Fatal error and exception handling UID: ZEP-SYRS-5 STATUS: Draft TYPE: Functional COMPONENT: Exception and Error Handling RELATIONS (Child): STATEMENT:

The Zephyr RTOS shall provide a framework for error and exception handling.

USER_STORY:

As a Zephyr RTOS user I want errors and exceptions to handled and react according to my applications requirements (e.g. reach/establish the applications safety state).

  • ZEP-SRS-16-1
    4.1. Fatal Exception Error Handler UID: ZEP-SRS-16-1 STATUS: Draft TYPE: Functional COMPONENT: Exception and Error Handling RELATIONS (Parent): 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.

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

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

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

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

  • ZEP-SRS-16-4
    4.4. Assigning a specific handler for a fatal error UID: ZEP-SRS-16-4 STATUS: Draft TYPE: Functional COMPONENT: Exception and Error Handling RELATIONS (Parent): STATEMENT:

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

ZEP-SYRS-6
6. Common File system operation support UID: ZEP-SYRS-6 STATUS: Draft TYPE: Functional COMPONENT: File Systems RELATIONS (Child): STATEMENT:

The Zephyr RTOS shall provide a framework for managing file system access.

USER_STORY:

As a Zephyr RTOS user I want a posix / c like file system access to store data.

  • ZEP-SRS-17-1
    6.1. Create file UID: ZEP-SRS-17-1 STATUS: Draft TYPE: Functional COMPONENT: File System RELATIONS (Parent): 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).

  • ZEP-SRS-17-2
    6.2. Open files UID: ZEP-SRS-17-2 STATUS: Draft TYPE: Functional COMPONENT: File System RELATIONS (Parent): 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.

  • ZEP-SRS-17-3
    6.3. Read files UID: ZEP-SRS-17-3 STATUS: Draft TYPE: Functional COMPONENT: File System RELATIONS (Parent): 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.

  • ZEP-SRS-17-4
    6.4. Write to files UID: ZEP-SRS-17-4 STATUS: Draft TYPE: Functional COMPONENT: File System RELATIONS (Parent): 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.

  • ZEP-SRS-17-5
    6.5. Close file UID: ZEP-SRS-17-5 STATUS: Draft TYPE: Functional COMPONENT: File System RELATIONS (Parent): 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.

  • ZEP-SRS-17-6
    6.6. Move file UID: ZEP-SRS-17-6 STATUS: Draft TYPE: Functional COMPONENT: File System RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-17-7
    6.7. Delete file UID: ZEP-SRS-17-7 STATUS: Draft TYPE: Functional COMPONENT: File System RELATIONS (Parent): 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.

  • ZEP-SRS-7-1
    1. Installing static IRQ service routines (ISR). UID: ZEP-SRS-7-1 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): 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.

  • ZEP-SRS-7-2
    2. Static IRQ initial status. UID: ZEP-SRS-7-2 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

    The static IRQ shall be initially disabled.

  • ZEP-SRS-7-3
    3. Installing direct IRQ service routines (ISR). UID: ZEP-SRS-7-3 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): 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.

  • ZEP-SRS-7-4
    4. Direct IRQ initial status. UID: ZEP-SRS-7-4 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

    The direct IRQ shall be initially disabled.

  • ZEP-SRS-7-5
    5. Installing dynamic IRQ service routines (ISR). UID: ZEP-SRS-7-5 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-7-6
    6. Dynamic IRQ initial status. UID: ZEP-SRS-7-6 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

    The dynamic IRQ shall be initially disabled.

  • ZEP-SRS-7-7
    7. Uninstalling dynamic IRQ service routines (ISR). UID: ZEP-SRS-7-7 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-7-8
    8. Global IRQ disable UID: ZEP-SRS-7-8 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-7-9
    9. Global IRQ enable UID: ZEP-SRS-7-9 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-7-10
    10. Specific IRQ disable UID: ZEP-SRS-7-10 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-7-11
    11. Specific IRQ enable UID: ZEP-SRS-7-11 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-7-12
    12. IRQ Enabled status UID: ZEP-SRS-7-12 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

    Zephyr RTOS shall provide a mechanism that returns the enabled status of a specified IRQ, where the status is enabled or disabled.

  • ZEP-SRS-7-13
    13. ISR Context status UID: ZEP-SRS-7-13 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

    Zephyr RTOS shall provide a mechanism 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 conditional behavior.

  • ZEP-SRS-7-14
    14. Multi-level interrupts UID: ZEP-SRS-7-14 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-7-15
    15. Interrupt service routine invocation UID: ZEP-SRS-7-15 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

    When an enabled IRQ that has a connected interrupt service routine is asserted, the Zephyr RTOS shall invoke the associated interrupt service routine.

  • ZEP-SRS-7-16
    16. Interrupt service routine parameter UID: ZEP-SRS-7-16 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

    When the Zephyr RTOS invokes a static or dynamic interrupt service routine, it shall pass to the routine the parameter that was registered with it.

  • ZEP-SYRS-20
    8. Direct ISR, Platform Specific helpers. UID: ZEP-SYRS-20 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

    Zephyr RTOS shall support development of direct ISRs by providing platform specific code fragments and factory functions including, minimal header instructions, minimal footer instructions, low power termination, and ISR construction.

    USER_STORY:

    As the Zephyr RTOS user I want the Kernel to provide support for implementing standard low latency and low power interrupt service routines without detailed knowledge of the platform architecture and programming model.

ZEP-SYRS-20
8. Direct ISR, Platform Specific helpers. UID: ZEP-SYRS-20 STATUS: Draft TYPE: Functional COMPONENT: Interrupts RELATIONS (Parent): STATEMENT:

Zephyr RTOS shall support development of direct ISRs by providing platform specific code fragments and factory functions including, minimal header instructions, minimal footer instructions, low power termination, and ISR construction.

USER_STORY:

As the Zephyr RTOS user I want the Kernel to provide support for implementing standard low latency and low power interrupt service routines without detailed knowledge of the platform architecture and programming model.

ZEP-SYRS-8
9. Logging UID: ZEP-SYRS-8 STATUS: Draft TYPE: Functional COMPONENT: Logging RELATIONS (Child): STATEMENT:

The Zephyr RTOS shall provide a framework for logging events.

USER_STORY:

As a Zephyr RTOS user I want to be able to log application defined events as well as framework exceptions.

  • ZEP-SRS-11-1
    1. Dedicated Logging Thread Support UID: ZEP-SRS-11-1 STATUS: Draft TYPE: Functional COMPONENT: Logging RELATIONS (Parent): 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.

  • ZEP-SRS-11-2
    2. Logs available for post processing UID: ZEP-SRS-11-2 STATUS: Draft TYPE: Functional COMPONENT: Logging RELATIONS (Parent): 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.

  • ZEP-SRS-11-3
    3. Formatting log messages UID: ZEP-SRS-11-3 STATUS: Draft TYPE: Functional COMPONENT: Logging RELATIONS (Parent): 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.

  • ZEP-SRS-11-4
    4. Logging Filtering Support UID: ZEP-SRS-11-4 STATUS: Draft TYPE: Functional COMPONENT: Logging RELATIONS (Parent): 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).

  • ZEP-SRS-11-5
    5. Multiple Backend Logging Support UID: ZEP-SRS-11-5 STATUS: Draft TYPE: Functional COMPONENT: Logging RELATIONS (Parent): 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.).

  • ZEP-SRS-11-6
    6. Deferred Logging Support UID: ZEP-SRS-11-6 STATUS: Draft TYPE: Functional COMPONENT: Logging RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall support deferred logging.

    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.

  • ZEP-SRS-9-1
    1. Dynamic Memory Allocation UID: ZEP-SRS-9-1 STATUS: Draft TYPE: Functional COMPONENT: Memory Objects RELATIONS (Parent): 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.

  • ZEP-SRS-9-2
    2. Memory Slab Object UID: ZEP-SRS-9-2 STATUS: Draft TYPE: Functional COMPONENT: Memory Objects RELATIONS (Parent): 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.

  • ZEP-SRS-8-1
    1. Memory Protection UID: ZEP-SRS-8-1 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-2
    2. Granting access to kernel objects UID: ZEP-SRS-8-2 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-3
    3. Separation between user and kernel threads for memory access UID: ZEP-SRS-8-3 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-4
    4. Safely handle unimplemented calls or invalid system calls UID: ZEP-SRS-8-4 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-5
    5. Response to invalid system call IDs UID: ZEP-SRS-8-5 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-6
    6. Prevent user threads creating higher priority threads UID: ZEP-SRS-8-6 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-8-7
    7. Revoking threads permissions on a kernel object UID: ZEP-SRS-8-7 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-8
    8. Prevent user threads creating supervisor threads UID: ZEP-SRS-8-8 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-9
    9. Reduced Privilege Level Threads UID: ZEP-SRS-8-9 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-10
    10. User Mode Threads Performing Privileged Operations UID: ZEP-SRS-8-10 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-11
    11. User mode handling of detected stack overflow UID: ZEP-SRS-8-11 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-12
    12. Stack Overflow Detection UID: ZEP-SRS-8-12 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-13
    13. Boot Time Memory Access Policy UID: ZEP-SRS-8-13 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-8-14
    14. System Call Handler Functions UID: ZEP-SRS-8-14 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-15
    15. System Call C strings in user mode UID: ZEP-SRS-8-15 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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 ???
  • ZEP-SRS-8-16
    16. Tracking kernel objects in used by user mode threads UID: ZEP-SRS-8-16 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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).

  • ZEP-SRS-8-17
    17. Granting threads access to specific memory UID: ZEP-SRS-8-17 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

  • ZEP-SRS-8-18
    18. Assigning memory pools to act as a thread resource pool UID: ZEP-SRS-8-18 STATUS: Draft TYPE: Functional COMPONENT: Memory Protection RELATIONS (Parent): 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.

ZEP-SYRS-10
11. Power Management UID: ZEP-SYRS-10 STATUS: Draft TYPE: Functional COMPONENT: Power Management RELATIONS (Child): STATEMENT:

The Zephyr RTOS shall provide an interface to control hardware power states.

USER_STORY:

As a Zephyr RTOS user I want to be able to control the power mode of the MCU and its peripherals to take advantage of the hardware features and to be able to implement low power or battery driven long life applications.

  • ZEP-SRS-13-1
    1. Power State Control UID: ZEP-SRS-13-1 STATUS: Draft TYPE: Functional COMPONENT: Power Management RELATIONS (Parent): 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.

  • ZEP-SRS-13-2
    2. Power Management UID: ZEP-SRS-13-2 STATUS: Draft TYPE: Functional COMPONENT: Power Management RELATIONS (Parent): STATEMENT:

    TBD

  • ZEP-SRS-13-3
    3. Notification of changes to system power states UID: ZEP-SRS-13-3 STATUS: Draft TYPE: Functional COMPONENT: Power Management RELATIONS (Parent): STATEMENT:

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

12. Multi core and SMP

ZEP-SYRS-11
12.1. Multiple CPU scheduling UID: ZEP-SYRS-11 STATUS: Draft TYPE: Functional COMPONENT: SMP and Multi core STATEMENT:

The Zephyr RTOS shall support scheduling of threads on multiple hardware CPUs.

USER_STORY:

As a Zephyr RTOS user I want Zephyr OS to run on MCUs/CPUs with one or more CPU cores.

ZEP-SYRS-12
12.2. Scheduling UID: ZEP-SYRS-12 STATUS: Draft TYPE: Functional COMPONENT: SMP and Multi core STATEMENT:

The Zephyr RTOS shall provide an interface to assign a thread to a specific CPU.

USER_STORY:

As a Zephyr RTOS user, I want to be able to control which thread will run on which CPU.

13. Thread Synchronization

ZEP-SYRS-13
13.1. Mutex UID: ZEP-SYRS-13 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Child): STATEMENT:

The Zephyr RTOS shall provide an interface for managing communication between threads.

USER_STORY:

As a Zephyr RTOS user I want to able to exchange information between threads in a thread-safe manner guaranteeing data consistence.

  • ZEP-SRS-6-1
    1. Mutex Kernel Object UID: ZEP-SRS-6-1 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mutex that allows threads to obtain mutually exclusive access to a shared resource.

    USER_STORY:

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

  • ZEP-SRS-6-2
    2. Mutex definition at compile time UID: ZEP-SRS-6-2 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-6-3
    3. Mutex definition at run time UID: ZEP-SRS-6-3 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism to initialize a mutex at run time.

  • ZEP-SRS-6-4
    4. Locking a mutex UID: ZEP-SRS-6-4 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for a thread to lock a mutex and become its owner.

  • ZEP-SRS-6-5
    5. Locking an unowned mutex UID: ZEP-SRS-6-5 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Parent): STATEMENT:

    While a mutex is not owned by any thread, a thread that locks it shall acquire ownership of the mutex.

  • ZEP-SRS-6-6
    6. Locking a mutex owned by another thread UID: ZEP-SRS-6-6 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Parent): STATEMENT:

    While a mutex is owned by another thread, a thread that attempts to lock it shall be blocked until the mutex becomes available or the specified timeout elapses.

  • ZEP-SRS-6-7
    7. Mutex lock timeout UID: ZEP-SRS-6-7 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Parent): STATEMENT:

    When locking a mutex, the Zephyr RTOS shall accept a timeout that specifies the maximum time to wait for the mutex to become available.

  • ZEP-SRS-6-8
    8. Mutex lock timeout expiry UID: ZEP-SRS-6-8 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Parent): STATEMENT:

    When a mutex does not become available within the specified time, the Zephyr RTOS shall return an error indicating that the mutex was not locked.

  • ZEP-SRS-6-9
    9. Recursive mutex locking UID: ZEP-SRS-6-9 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Parent): STATEMENT:

    While a thread owns a mutex, the Zephyr RTOS shall allow that thread to lock the same mutex again, and shall require the thread to unlock it the same number of times before it is released.

  • ZEP-SRS-6-10
    10. Unlocking a mutex UID: ZEP-SRS-6-10 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for the owning thread to unlock a mutex.

  • ZEP-SRS-6-11
    11. Unlocking by a non-owner UID: ZEP-SRS-6-11 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Parent): STATEMENT:

    If a thread that does not own a mutex attempts to unlock it, then the Zephyr RTOS shall return an error and shall not release the mutex.

  • ZEP-SRS-6-12
    12. Priority inheritance UID: ZEP-SRS-6-12 STATUS: Draft TYPE: Functional COMPONENT: Mutex RELATIONS (Parent): STATEMENT:

    While a higher-priority thread is blocked waiting on a mutex, the Zephyr RTOS shall raise the priority of the owning thread to that of the highest-priority waiting thread until the mutex is released.

  • ZEP-SRS-5-1
    1. Counting Semaphore Definition At Compile Time UID: ZEP-SRS-5-1 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-5-2
    2. Counting Semaphore Definition At Run Time UID: ZEP-SRS-5-2 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-5-3
    3. Maximum limit of a semaphore UID: ZEP-SRS-5-3 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): 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.

  • ZEP-SRS-5-4
    4. Initialialization with maximum count value UID: ZEP-SRS-5-4 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-5-5
    5. Initial semaphore value UID: ZEP-SRS-5-5 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-5-6
    6. Semaphore acquisition mechanism UID: ZEP-SRS-5-6 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-5-7
    7. Semaphore acquisition with count greater than zero UID: ZEP-SRS-5-7 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-5-8
    8. Semaphore acquisition with zero count UID: ZEP-SRS-5-8 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-5-9
    9. Semaphore acquisition timeout UID: ZEP-SRS-5-9 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): 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.

  • ZEP-SRS-5-10
    10. Semaphore acquisition timeout error handling UID: ZEP-SRS-5-10 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): 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.

  • ZEP-SRS-5-11
    11. Semaphore acquisition no wait error handling UID: ZEP-SRS-5-11 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): 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.

  • ZEP-SRS-5-12
    12. Semaphore release UID: ZEP-SRS-5-12 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-5-13
    13. Semaphore count increment on release UID: ZEP-SRS-5-13 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-5-14
    14. Highest-priority waiter unblocked on release UID: ZEP-SRS-5-14 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-5-15
    15. Checking semaphore count UID: ZEP-SRS-5-15 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-5-16
    16. Semaphore reset UID: ZEP-SRS-5-16 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-5-17
    17. Semaphore acquisitions abort after reset UID: ZEP-SRS-5-17 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

    When a semaphore is reset, the Zephyr RTOS shall abort all pending take operations on the semaphore, returning to the affected threads the same error used to indicate a wait timeout.

  • ZEP-SRS-5-18
    18. Semaphore Initialization Option Validation UID: ZEP-SRS-5-18 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): 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.

  • ZEP-SRS-5-19
    19. Semaphore release at maximum count UID: ZEP-SRS-5-19 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

    When a semaphore is released while its count is already at the maximum permitted count, the Zephyr RTOS shall leave the count unchanged.

  • ZEP-SRS-5-20
    20. Semaphore operations from interrupt context UID: ZEP-SRS-5-20 STATUS: Draft TYPE: Functional COMPONENT: Semaphore RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall allow a semaphore to be released from an interrupt service routine, and to be acquired from an interrupt service routine when no waiting is requested.

14. Threads

ZEP-SYRS-15
14.1. Thread support UID: ZEP-SYRS-15 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Child): STATEMENT:

The Zephyr RTOS shall support threads.

USER_STORY:

As a Zephyr RTOS user, I want to be able to have support for the kernel objects named threads for processing work.

  • ZEP-SRS-2-4
    2.1. Scheduling a thread based on an event UID: ZEP-SRS-2-4 STATUS: Draft TYPE: Functional COMPONENT: Thread Scheduling RELATIONS (Parent): 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.

  • ZEP-SRS-1-1
    1. Creating threads UID: ZEP-SRS-1-1 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-3
    3. Suspending a thread UID: ZEP-SRS-1-3 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-4
    4. Resuming a suspended thread UID: ZEP-SRS-1-4 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-5
    5. Resuming a suspended thread after a timeout UID: ZEP-SRS-1-5 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-6
    6. Deleting a thread UID: ZEP-SRS-1-6 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-7
    7. Thread states UID: ZEP-SRS-1-7 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): 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.

  • ZEP-SRS-1-8
    8. Thread stack objects UID: ZEP-SRS-1-8 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): 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.

  • ZEP-SRS-1-9
    9. Thread privileges UID: ZEP-SRS-1-9 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-11
    11. Thread Options UID: ZEP-SRS-1-11 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): 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.

  • ZEP-SRS-1-12
    12. Thread Custom Data UID: ZEP-SRS-1-12 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): 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

ZEP-SYRS-16
14.2. Thread management UID: ZEP-SYRS-16 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Child): STATEMENT:

The Zephyr RTOS shall provide a framework for managing multiple threads of execution.

USER_STORY:

As a Zephyr RTOS user, I want to be able to manage the execute of multiple threads with different priorities.

  • ZEP-SRS-1-1
    1. Creating threads UID: ZEP-SRS-1-1 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-3
    3. Suspending a thread UID: ZEP-SRS-1-3 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-4
    4. Resuming a suspended thread UID: ZEP-SRS-1-4 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-5
    5. Resuming a suspended thread after a timeout UID: ZEP-SRS-1-5 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-6
    6. Deleting a thread UID: ZEP-SRS-1-6 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-7
    7. Thread states UID: ZEP-SRS-1-7 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): 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.

  • ZEP-SRS-1-8
    8. Thread stack objects UID: ZEP-SRS-1-8 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): 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.

  • ZEP-SRS-1-9
    9. Thread privileges UID: ZEP-SRS-1-9 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-10
    10. Scheduling multiple threads UID: ZEP-SRS-1-10 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-1-11
    11. Thread Options UID: ZEP-SRS-1-11 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): 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.

  • ZEP-SRS-1-12
    12. Thread Custom Data UID: ZEP-SRS-1-12 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): 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

ZEP-SYRS-17
14.3. Thread priority UID: ZEP-SYRS-17 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Child): STATEMENT:

Threads shall have a priority.

USER_STORY:

As a Zephyr RTOS user, I want to be able to give my threads different priorities for execution.

  • ZEP-SRS-1-2
    2. Setting thread priority UID: ZEP-SRS-1-2 STATUS: Draft TYPE: Functional COMPONENT: Threads RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-1
    1. Timer definition at compile time UID: ZEP-SRS-4-1 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-2
    2. Timer expiry function UID: ZEP-SRS-4-2 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-3
    3. Timer stop function UID: ZEP-SRS-4-3 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-4
    4. Timer definition at run time UID: ZEP-SRS-4-4 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-5
    5. Timer start UID: ZEP-SRS-4-5 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-6
    6. Timer stop UID: ZEP-SRS-4-6 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-7
    7. Timer status UID: ZEP-SRS-4-7 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-8
    8. Timer status reinitialization UID: ZEP-SRS-4-8 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

    When a timer is initialized, started, or read via the timer status or synchronization mechanism, the Zephyr RTOS shall reset the timer's expiration count to zero.

  • ZEP-SRS-4-9
    9. Timer thread synchronization UID: ZEP-SRS-4-9 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism to synchronize a thread to a timer and then block the thread's execution until any of the following conditions is satisfied: - The timer is stopped - The timer's expiration count is greater than zero

  • ZEP-SRS-4-10
    10. Timer next expiration time in system ticks UID: ZEP-SRS-4-10 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-11
    11. Timer remaining time until expiration in system ticks UID: ZEP-SRS-4-11 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-12
    12. Timer remaining time until expiration in milliseconds UID: ZEP-SRS-4-12 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-13
    13. Timer set user data UID: ZEP-SRS-4-13 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-14
    14. Timer get user data UID: ZEP-SRS-4-14 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-4-15
    15. Timer expire functions in interrupt context UID: ZEP-SRS-4-15 STATUS: Draft TYPE: Functional COMPONENT: Timers RELATIONS (Parent): STATEMENT:

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

ZEP-SYRS-19
16. Tracing UID: ZEP-SYRS-19 STATUS: Draft TYPE: Functional COMPONENT: Tracing RELATIONS (Child): STATEMENT:

Zepyhr shall provide a framework mechanism for tracing low level system operations (NOTE: system calls, interrupts, kernel calls, thread, synchronization, etc.).

USER_STORY:

As a Zephyr RTOS user, I want to be able to trace different OS operations.

  • ZEP-SRS-10-1
    1. Initializing a trace UID: ZEP-SRS-10-1 STATUS: Draft TYPE: Functional COMPONENT: Tracing RELATIONS (Parent): STATEMENT:

    Zephyr shall provide an interface to initialize a trace.

  • ZEP-SRS-10-2
    2. Triggering a trace UID: ZEP-SRS-10-2 STATUS: Draft TYPE: Functional COMPONENT: Tracing RELATIONS (Parent): STATEMENT:

    Zephyr shall provide an interface to trigger a trace.

  • ZEP-SRS-10-3
    3. Dumping trace results UID: ZEP-SRS-10-3 STATUS: Draft TYPE: Functional COMPONENT: Tracing RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-10-4
    4. Removing trace data UID: ZEP-SRS-10-4 STATUS: Draft TYPE: Functional COMPONENT: Tracing RELATIONS (Parent): STATEMENT:

    Zephyr shall provide an interface to remove trace data.

  • ZEP-SRS-10-5
    5. Tracing Object Identification UID: ZEP-SRS-10-5 STATUS: Draft TYPE: Functional COMPONENT: Tracing RELATIONS (Parent): STATEMENT:

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

    USER_STORY:

    As a Zephyr 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.

  • ZEP-SRS-10-6
    6. Tracing Non-Interference UID: ZEP-SRS-10-6 STATUS: Draft TYPE: Functional COMPONENT: Tracing RELATIONS (Parent): STATEMENT:

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

    USER_STORY:

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

17. Condition Variables

  • ZEP-SRS-21-1
    20.1. Dynamic initialization of condition variables UID: ZEP-SRS-21-1 STATUS: Draft TYPE: Functional COMPONENT: Condition Variables RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-21-2
    20.2. Static initialization of condition variables UID: ZEP-SRS-21-2 STATUS: Draft TYPE: Functional COMPONENT: Condition Variables RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-21-3
    20.3. Signal one waiting thread UID: ZEP-SRS-21-3 STATUS: Draft TYPE: Functional COMPONENT: Condition Variables RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-21-4
    20.4. Signal multiple waiting threads UID: ZEP-SRS-21-4 STATUS: Draft TYPE: Functional COMPONENT: Condition Variables RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-21-5
    20.5. Wait on a condition variable UID: ZEP-SRS-21-5 STATUS: Draft TYPE: Functional COMPONENT: Condition Variables RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-21-6
    20.6. Wait timeout on a condition variable UID: ZEP-SRS-21-6 STATUS: Draft TYPE: Functional COMPONENT: Condition Variables RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-21-7
    20.7. Wait timeout occurence UID: ZEP-SRS-21-7 STATUS: Draft TYPE: Functional COMPONENT: Condition Variables RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-21-8
    20.8. Release mutex on wait UID: ZEP-SRS-21-8 STATUS: Draft TYPE: Functional COMPONENT: Condition Variables RELATIONS (Parent): STATEMENT:

    When a thread waits on a condition variable, the Zephyr RTOS shall atomically release the associated mutex while the thread is blocked and re-acquire it before the thread resumes.

  • ZEP-SRS-21-9
    20.9. Unblock a waiting thread UID: ZEP-SRS-21-9 STATUS: Draft TYPE: Functional COMPONENT: Condition Variables RELATIONS (Parent): STATEMENT:

    Whenever a thread signals a condition variable, the Zephyr RTOS shall unblock the highest priority thread currently waiting on that condition variable.

18. Queues

  • ZEP-SRS-20-1
    1. Queue definition at compile time UID: ZEP-SRS-20-1 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-20-2
    2. Queue definition at run time. UID: ZEP-SRS-20-2 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-20-3
    3. Queue enqueue item to the back UID: ZEP-SRS-20-3 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-20-4
    4. Queue enqueue item to the front UID: ZEP-SRS-20-4 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-20-5
    5. Queue remove item UID: ZEP-SRS-20-5 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-20-6
    6. Queue get and dequeue item from front UID: ZEP-SRS-20-6 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-20-7
    7. Queue empty check UID: ZEP-SRS-20-7 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-20-8
    8. Queue peek item at back UID: ZEP-SRS-20-8 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-20-9
    9. Queue peek item at front UID: ZEP-SRS-20-9 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-20-10
    10. Queue insert UID: ZEP-SRS-20-10 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-20-11
    11. Queue append item list to the back UID: ZEP-SRS-20-11 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-20-12
    12. Queue append and empty item list to the back UID: ZEP-SRS-20-12 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): 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.

  • ZEP-SRS-20-13
    13. Queue append unique data item UID: ZEP-SRS-20-13 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-20-14
    14. Queue implicit memory allocation UID: ZEP-SRS-20-14 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

19. LIFOs

ZEP-SYRS-23
19.1. LIFOs data passing UID: ZEP-SYRS-23 STATUS: Draft TYPE: Functional COMPONENT: LIFOs RELATIONS (Child): STATEMENT:

The Zephyr RTOS shall implement a LIFOs which can be used to pass data between threads and interrupt service routines.

  • ZEP-SRS-23-1
    1. LIFO definition at compile time UID: ZEP-SRS-23-1 STATUS: Draft TYPE: Functional COMPONENT: LIFOs RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-23-2
    2. LIFO enqueue item to the back UID: ZEP-SRS-23-2 STATUS: Draft TYPE: Functional COMPONENT: LIFOs RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-23-3
    3. LIFO implicit memory allocation UID: ZEP-SRS-23-3 STATUS: Draft TYPE: Functional COMPONENT: LIFOs RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-23-4
    4. LIFO get and dequeue item from front UID: ZEP-SRS-23-4 STATUS: Draft TYPE: Functional COMPONENT: LIFOs RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-23-5
    5. Queue definition at compile time UID: ZEP-SRS-23-5 STATUS: Draft TYPE: Functional COMPONENT: Queues RELATIONS (Parent): STATEMENT:

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

20. FIFOs

  • ZEP-SRS-24-1
    23.1. FIFO definition at compile time UID: ZEP-SRS-24-1 STATUS: Draft TYPE: Functional COMPONENT: FIFOs RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-24-2
    23.2. FIFO cancel waiting thread UID: ZEP-SRS-24-2 STATUS: Draft TYPE: Functional COMPONENT: FIFOs RELATIONS (Parent): 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.

  • ZEP-SRS-24-3
    23.3. FIFO enqueue item to the back UID: ZEP-SRS-24-3 STATUS: Draft TYPE: Functional COMPONENT: FIFOs RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-24-4
    23.4. FIFO implicit memory allocation UID: ZEP-SRS-24-4 STATUS: Draft TYPE: Functional COMPONENT: FIFOs RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-24-5
    23.5. FIFO append item list to the back UID: ZEP-SRS-24-5 STATUS: Draft TYPE: Functional COMPONENT: FIFOs RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-24-6
    23.6. FIFO append and empty item list to the back UID: ZEP-SRS-24-6 STATUS: Draft TYPE: Functional COMPONENT: FIFOs RELATIONS (Parent): 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.

  • ZEP-SRS-24-7
    23.7. FIFO get and dequeue item from front UID: ZEP-SRS-24-7 STATUS: Draft TYPE: Functional COMPONENT: FIFOs RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-24-8
    23.8. FIFO empty check UID: ZEP-SRS-24-8 STATUS: Draft TYPE: Functional COMPONENT: FIFOs RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-24-9
    23.9. FIFO peek item at front UID: ZEP-SRS-24-9 STATUS: Draft TYPE: Functional COMPONENT: FIFOs RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-24-10
    23.10. FIFO peek item at back UID: ZEP-SRS-24-10 STATUS: Draft TYPE: Functional COMPONENT: FIFOs RELATIONS (Parent): STATEMENT:

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

21. Mailboxes

  • ZEP-SRS-25-1
    1. Mailbox Initialization At Run Time UID: ZEP-SRS-25-1 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

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

    USER_STORY:

    As a Zephyr RTOS developer, I want to be able to initialize a mailbox instance so that it is ready to be used for message exchange between threads.

  • ZEP-SRS-25-2
    2. Mailbox Initialization At Compile Time UID: ZEP-SRS-25-2 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism to statically define and initialize a mailbox object at compile time.

    USER_STORY:

    As a Zephyr RTOS developer, I want to be able to statically define and initialize a mailbox at compile time so that it is available immediately without runtime initialization.

  • ZEP-SRS-25-3
    3. Message Size Support UID: ZEP-SRS-25-3 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall support messages containing zero or more bytes of data.

    USER_STORY:

    As a Zephyr RTOS developer, I want to be able to send messages of different sizes using the same mailbox so that I can efficiently communicate different types of information between threads.

  • ZEP-SRS-25-4
    4. Mailbox Data Transfer UID: ZEP-SRS-25-4 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall handle the data transfer between mailbox objects of the sending and receiving threads.

  • ZEP-SRS-25-5
    5. Synchronous Message Sending UID: ZEP-SRS-25-5 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for a thread to send a message through a mailbox and block until the message is processed or a timeout occurs.

    USER_STORY:

    As a Zephyr RTOS developer, I want to be able to send a message and wait for it to be processed so that I can be sure the message was received before continuing execution.

  • ZEP-SRS-25-6
    6. Synchronous Send Timeout Handling UID: ZEP-SRS-25-6 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    If the synchronous message send operation times out before a receiver processes the message, the Zephyr RTOS shall return an timeout error code to the sending thread.

    USER_STORY:

    As a Zephyr RTOS developer, I want to be able to limit how long my thread waits for a message to be received so that I can implement fallback behavior if communication takes too long.

  • ZEP-SRS-25-7
    7. Asynchronous Message Sending UID: ZEP-SRS-25-7 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for a thread to send a message through a mailbox without waiting for it to be processed.

    USER_STORY:

    As a Zephyr RTOS developer, I want to be able to send a message without waiting for it to be processed so that my thread can continue execution immediately.

  • ZEP-SRS-25-8
    8. Asynchronous Completion Signaling UID: ZEP-SRS-25-8 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    When a sending thread asynchronously sends a message to a mailbox object, the Zephyr RTOS shall provide a mechanism to signal to the sending thread that the message has been both received and completely processed by the receiver.

    USER_STORY:

    As a Zephyr RTOS developer, I want to be notified when my asynchronously sent message has been fully processed so that I can perform follow-up actions without polling.

  • ZEP-SRS-25-9
    9. Message Reception UID: ZEP-SRS-25-9 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for a thread to receive a message via a mailbox object with a timeout parameter.

    USER_STORY:

    As a Zephyr RTOS developer, I want to be able to receive messages from other threads with control over how long to wait for a message to arrive.

  • ZEP-SRS-25-10
    10. Message Data Retrieval UID: ZEP-SRS-25-10 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for a thread to retrieve message data via a mailbox object.

    USER_STORY:

    As a Zephyr RTOS developer, I want to be able to extract message data into my buffer after message reception so that I can process the information contained in the message.

  • ZEP-SRS-25-11
    11. Message Reception Blocking UID: ZEP-SRS-25-11 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    When a receiving thread requests a message via a mailbox object and no message is available, the Zephyr RTOS shall block the receiving thread until a message is available or the timeout expires.

  • ZEP-SRS-25-12
    12. Message Reception Timeout Handling UID: ZEP-SRS-25-12 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    If the message receive operation times out before a message becomes available, the Zephyr RTOS shall return an appropriate timeout error code to the receiving thread.

    USER_STORY:

    As a Zephyr RTOS developer, I want to be able to limit how long my thread waits for a message to arrive so that I can implement fallback behavior if communication takes too long.

  • ZEP-SRS-25-13
    13. Non-Anonymous Messaging UID: ZEP-SRS-25-13 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall handle message exchange via a mailbox object non-anonymously, allowing both the sending and receiving threads to know the identity of the other thread.

    USER_STORY:

    As a Zephyr RTOS developer, I want to be able to identify the source or destination of messages so that I can implement thread-specific handling of message content.

  • ZEP-SRS-25-14
    14. Priority-Based Message Delivery UID: ZEP-SRS-25-14 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    When multiple threads are waiting on an empty mailbox object, the Zephyr RTOS shall deliver the next message to the highest priority thread.

    USER_STORY:

    As a Zephyr RTOS developer, I want message delivery to respect thread priorities so that higher priority tasks receive messages before lower priority ones.

  • ZEP-SRS-25-15
    15. Priority-Based Message Delivery UID: ZEP-SRS-25-15 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    When multiple threads of equal priority are waiting on an empty mailbox object, the Zephyr RTOS shall deliver the next message to the thread that has waited the longest.

  • ZEP-SRS-25-16
    16. Mailbox Quantity Support UID: ZEP-SRS-25-16 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall support an arbitrary number of mailbox objects, limited only by available RAM in the system.

    USER_STORY:

    As a Zephyr RTOS developer, I want to be able to create as many mailboxes as my application needs without arbitrary limitations so that I can design my communication architecture freely.

  • ZEP-SRS-25-17
    17. Invalid Parameter Handling UID: ZEP-SRS-25-17 STATUS: Draft TYPE: Functional COMPONENT: Mailboxes RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall handle invalid parameters by returning error codes rather than causing system failures.

    USER_STORY:

    As a Zephyr RTOS developer, I want the system to validate my inputs and return errors rather than crash when I provide invalid parameters so that I can develop more robust applications.

22. Atomic Service

  • ZEP-SRS-26-1
    26.1. Atomic variable UID: ZEP-SRS-26-1 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall define an atomic variable type whose size matches the native word size of the target architecture: 32 bits on 32-bit architectures and 64 bits on 64-bit architectures.

  • ZEP-SRS-26-2
    26.2. Atomic value UID: ZEP-SRS-26-2 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall define a signed integer type, whose size is determined by the target processor architecture, used as the parameter and return type of operations on atomic variables.

  • ZEP-SRS-26-3
    26.3. Tearing freedom UID: ZEP-SRS-26-3 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall guarantee that each operation on an atomic variable is free from torn reads or writes.

  • ZEP-SRS-26-4
    26.4. Cross-CPU visibility UID: ZEP-SRS-26-4 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall guarantee that the result of each operation on an atomic variable is visible to all processors in the system.

  • ZEP-SRS-26-5
    26.5. Indivisibility UID: ZEP-SRS-26-5 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for performing all operations on an atomic variable in an indivisible manner.

  • ZEP-SRS-26-6
    26.6. Memory ordering UID: ZEP-SRS-26-6 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    When performing an operation on an atomic variable, the Zephyr RTOS shall provide full memory barrier semantics, such that memory operations issued before the atomic operation are observed before it and memory operations issued after it are observed after it.

  • ZEP-SRS-26-7
    26.7. Software implementation fallback UID: ZEP-SRS-26-7 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall support executing atomic operations on hardware that does not provide native atomic instruction support.

  • ZEP-SRS-26-8
    26.8. Native atomic instructions UID: ZEP-SRS-26-8 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    Where the target hardware provides native atomic instructions, the Zephyr RTOS shall support implementing atomic operations using those instructions.

  • ZEP-SRS-26-9
    26.9. Compute size of atomic variables UID: ZEP-SRS-26-9 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a compile-time mechanism for computing the minimum number of atomic variables necessary to represent a bit array of a given number of bits.

  • ZEP-SRS-26-10
    26.10. Define an array of atomic variables UID: ZEP-SRS-26-10 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a compile-time mechanism for defining an array of atomic variables with the minimum size necessary to represent a bit array of a given number of bits.

  • ZEP-SRS-26-11
    26.11. Initialize atomic variable UID: ZEP-SRS-26-11 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a compile-time mechanism for initializing an atomic variable.

  • ZEP-SRS-26-12
    26.12. Set atomic variable UID: ZEP-SRS-26-12 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for setting an atomic variable and returning its previous value.

  • ZEP-SRS-26-13
    26.13. Get atomic variable UID: ZEP-SRS-26-13 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for getting the value from an atomic variable.

  • ZEP-SRS-26-14
    26.14. Atomic bitwise operations UID: ZEP-SRS-26-14 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): RELATIONS (Child): STATEMENT:

    When performing a bitwise operation on an atomic variable, the Zephyr RTOS shall store the result in the atomic variable and return its previous value.

  • ZEP-SRS-26-19
    26.19. Atomic addition UID: ZEP-SRS-26-19 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): RELATIONS (Child): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for adding a value to an atomic variable and returning its previous value.

  • ZEP-SRS-26-21
    26.21. Atomic subtraction UID: ZEP-SRS-26-21 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): RELATIONS (Child): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for subtracting a value from an atomic variable and returning its previous value.

  • ZEP-SRS-26-23
    26.23. Atomic compare and set UID: ZEP-SRS-26-23 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for setting an atomic variable to a new value if and only if its current value equals an expected value, leaving the atomic variable unchanged otherwise, and returning whether the atomic variable was updated.

  • ZEP-SRS-26-24
    26.24. Atomic clear UID: ZEP-SRS-26-24 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism for setting an atomic variable to zero and returning its previous value.

  • ZEP-SRS-26-25
    26.25. Atomic bit operations UID: ZEP-SRS-26-25 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): RELATIONS (Child): STATEMENT:

    The Zephyr RTOS shall support performing bit-level operations on individual bits within either a single atomic variable or an array of atomic variables.

  • ZEP-SRS-26-32
    26.32. Atomic pointer UID: ZEP-SRS-26-32 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall define an atomic variable type for storing a pointer value atomically.

  • ZEP-SRS-26-33
    26.33. Atomic pointer value UID: ZEP-SRS-26-33 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall define a pointer type used as the parameter and return type of all atomic pointer operations.

  • ZEP-SRS-26-34
    26.34. Initialize atomic pointer UID: ZEP-SRS-26-34 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a compile-time mechanism for initializing an atomic pointer to a specific pointer value.

  • ZEP-SRS-26-35
    26.35. Atomic pointer operations UID: ZEP-SRS-26-35 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): RELATIONS (Child): STATEMENT:

    The Zephyr RTOS shall provide operations that read and write atomic pointers using the atomic pointer value type.

  • ZEP-SRS-26-40
    26.40. Usable from threads and interrupt service routines UID: ZEP-SRS-26-40 STATUS: Draft TYPE: Functional COMPONENT: Atomic Service RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall support performing atomic operations from threads and from interrupt service routines, guaranteeing correct results when multiple contexts operate concurrently on the same atomic variable.

23. Stacks

  • ZEP-SRS-30-1
    1. Stack definition at compile time UID: ZEP-SRS-30-1 STATUS: Draft TYPE: Functional COMPONENT: Stacks RELATIONS (Parent): STATEMENT:

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

  • ZEP-SRS-30-2
    2. Stack initialization at run time with an user-defined memory area UID: ZEP-SRS-30-2 STATUS: Draft TYPE: Functional COMPONENT: Stacks RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism to initialize a stack at run time, using a data buffer provided by the user.

  • ZEP-SRS-30-3
    3. Stack initialization at run time with automatically allocated memory area UID: ZEP-SRS-30-3 STATUS: Draft TYPE: Functional COMPONENT: Stacks RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism to initialize a stack at run time, with automatic allocation of the stack memory.

  • ZEP-SRS-30-4
    4. Releasing a dynamically allocated stack buffer UID: ZEP-SRS-30-4 STATUS: Draft TYPE: Functional COMPONENT: Stacks RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism to deallocate all resources previously allocated by a run-time stack definition.

  • ZEP-SRS-30-5
    5. Push an item to the stack UID: ZEP-SRS-30-5 STATUS: Draft TYPE: Functional COMPONENT: Stacks RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism to add a new item on top of the stack.

  • ZEP-SRS-30-6
    6. Pop an item from the stack UID: ZEP-SRS-30-6 STATUS: Draft TYPE: Functional COMPONENT: Stacks RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism to retrieve the current item from the top of the stack and to remove such item from the stack.

  • ZEP-SRS-30-7
    7. Pushing onto a full stack UID: ZEP-SRS-30-7 STATUS: Draft TYPE: Functional COMPONENT: Stacks RELATIONS (Parent): RELATIONS (Child): STATEMENT:

    If the stack is full when an item is pushed, the Zephyr RTOS shall return an error and not add the item.

  • ZEP-SRS-30-8
    8. Concurrent access protection UID: ZEP-SRS-30-8 STATUS: Draft TYPE: Functional COMPONENT: Stacks RELATIONS (Parent): STATEMENT:

    The Zephyr RTOS shall provide a mechanism to push items to or pop items from the same stack object from multiple execution contexts which can run concurrently.

    USER_STORY:

    As a Zephyr RTOS user I want to access a stack from different execution contexts (like threads), including interrupt handlers.

  • ZEP-SRS-30-9
    9. Stack data retrieval with timeout UID: ZEP-SRS-30-9 STATUS: Draft TYPE: Functional COMPONENT: Stacks RELATIONS (Parent): RELATIONS (Child): STATEMENT:

    The Zephyr RTOS shall provide a mechanism to allow waiting for a stack item availability within a specified timeout.

    USER_STORY:

    As a Zephyr RTOS user I want to share a stack object between a producer and a consumer threads. The producer thread pushes items into the stack, while the consumer thread is waiting for an item to appear in the stack.