SPDX-License-Identifier: Apache-2.0
The Zephyr RTOS shall provide a framework to communicate with a set of hardware architectural services.
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.).
-
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.
-
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.
-
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.
-
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. Support multiprocessor management UID: ZEP-SYRS-2 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface parent relations: 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.
-
1. Architecture Layer Interface UID: ZEP-SYRS-1 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface child relations: 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.).
The Zephyr RTOS shall support symmetric multiprocessing on multiple cores.
As a Zephyr RTOS user I want to use Zephyr OS on multi core (SMP-)MCUs/MPUs.
- ZEP-SRS-18-1 Formatted output
- ZEP-SRS-18-2 Floating Point Math Support
- ZEP-SRS-18-3 Boolean Primitives Support
- ZEP-SRS-18-4 Standard Unix time interface
- ZEP-SRS-18-5 Strings support
- ZEP-SRS-18-6 Moving/copying regions of memory
- ZEP-SRS-18-7 I/O based interface
- ZEP-SRS-18-8 C99 integer types
- ZEP-SRS-18-9 Standard System Error Numbers (IEEE Std 1003.1-2017)
- ZEP-SRS-18-10 Document set of Zephyr OS required C library functions in Safety Manual
- ZEP-SRS-18-11 Support external C libraries documentation in Zephyr Safety Manual
The Zephyr RTOS shall support a subset of the standard C library.
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.
-
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. 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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
The Zephyr RTOS shall provide a framework for managing device drivers and peripherals.
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.
The Zephyr RTOS shall provide a framework for error and exception handling.
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).
The Zephyr RTOS shall provide a framework for managing file system access.
As a Zephyr RTOS user I want a posix / c like file system access to store data.
- ZEP-SRS-7-1 Installing static IRQ service routines (ISR).
- ZEP-SRS-7-2 Static IRQ initial status.
- ZEP-SRS-7-3 Installing direct IRQ service routines (ISR).
- ZEP-SRS-7-4 Direct IRQ initial status.
- ZEP-SRS-7-5 Installing dynamic IRQ service routines (ISR).
- ZEP-SRS-7-6 Dynamic IRQ initial status.
- ZEP-SRS-7-7 Uninstalling dynamic IRQ service routines (ISR).
- ZEP-SRS-7-8 Global IRQ disable
- ZEP-SRS-7-9 Global IRQ enable
- ZEP-SRS-7-10 Specific IRQ disable
- ZEP-SRS-7-11 Specific IRQ enable
- ZEP-SRS-7-12 IRQ Enabled status
- ZEP-SRS-7-13 ISR Context status
- ZEP-SRS-7-14 Multi-level interrupts
- ZEP-SYRS-20 Direct ISR, Platform Specific helpers.
The Zephyr RTOS shall provide a framework for interrupt and interrupt service routine management.
As the Zephyr RTOS user I want the Kernel to provide abstracted interfaces to the platform enabling me to implement standard interrupts interrupt service routines without detailed knowledge of the platform architecture and programming model.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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. 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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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. Direct ISR, Platform Specific helpers. UID: ZEP-SYRS-20 STATUS: Draft TYPE: Functional COMPONENT: Interrupts parent relations: child relations: - ZEP-SRS-21-1 Dynamic initialization of condition variables
- ZEP-SRS-21-2 Static initialization of condition variables
- ZEP-SRS-21-3 Signal one waiting thread
- ZEP-SRS-21-4 Signal multiple waiting threads
- ZEP-SRS-21-5 Wait on a condition variable
- ZEP-SRS-21-6 Wait timeout on a condition variable
- ZEP-SRS-21-7 Wait timeout occurence
- ZEP-SRS-21-8 Release mutex on wait
- ZEP-SRS-21-9 Unblock a waiting thread
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.
-
7. Interrupt Management UID: ZEP-SYRS-7 STATUS: Draft TYPE: Functional COMPONENT: Interrupts child relations: - ZEP-SRS-7-1 Installing static IRQ service routines (ISR).
- ZEP-SRS-7-2 Static IRQ initial status.
- ZEP-SRS-7-3 Installing direct IRQ service routines (ISR).
- ZEP-SRS-7-4 Direct IRQ initial status.
- ZEP-SRS-7-5 Installing dynamic IRQ service routines (ISR).
- ZEP-SRS-7-6 Dynamic IRQ initial status.
- ZEP-SRS-7-7 Uninstalling dynamic IRQ service routines (ISR).
- ZEP-SRS-7-8 Global IRQ disable
- ZEP-SRS-7-9 Global IRQ enable
- ZEP-SRS-7-10 Specific IRQ disable
- ZEP-SRS-7-11 Specific IRQ enable
- ZEP-SRS-7-12 IRQ Enabled status
- ZEP-SRS-7-13 ISR Context status
- ZEP-SRS-7-14 Multi-level interrupts
- ZEP-SYRS-20 Direct ISR, Platform Specific helpers.
STATEMENT: The Zephyr RTOS shall provide a framework for interrupt and interrupt service routine management.
USER_STORY: As the Zephyr RTOS user I want the Kernel to provide abstracted interfaces to the platform enabling me to implement standard interrupts interrupt service routines without detailed knowledge of the platform architecture and programming model.
- ZEP-SRS-21-1 Dynamic initialization of condition variables
- ZEP-SRS-21-2 Static initialization of condition variables
- ZEP-SRS-21-3 Signal one waiting thread
- ZEP-SRS-21-4 Signal multiple waiting threads
- ZEP-SRS-21-5 Wait on a condition variable
- ZEP-SRS-21-6 Wait timeout on a condition variable
- ZEP-SRS-21-7 Wait timeout occurence
- ZEP-SRS-21-8 Release mutex on wait
- ZEP-SRS-21-9 Unblock a waiting thread
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.
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.
-
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).
-
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).
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
The Zephyr RTOS shall provide a framework for logging events.
As a Zephyr RTOS user I want to be able to log application defined events as well as framework exceptions.
The Zephyr RTOS shall support a memory management framework.
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.
The Zephyr RTOS shall provide an interface to control hardware power states.
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.
12. Multi core and SMP
The Zephyr RTOS shall support scheduling of threads on multiple hardware CPUs.
As a Zephyr RTOS user I want Zephyr OS to run on MCUs/CPUs with one or more CPU cores.
The Zephyr RTOS shall provide an interface to assign a thread to a specific CPU.
As a Zephyr RTOS user, I want to be able to control which thread will run on which CPU.
13. Thread Synchronization
The Zephyr RTOS shall provide an interface for managing communication between threads.
As a Zephyr RTOS user I want to able to exchange information between threads in a thread-safe manner guaranteeing data consistence.
- ZEP-SRS-5-1 Counting Semaphore Definition At Compile Time
- ZEP-SRS-5-2 Counting Semaphore Definition At Run Time
- ZEP-SRS-5-4 Initialialization with maximum count value
- ZEP-SRS-5-5 Initial semaphore value
- ZEP-SRS-5-6 Semaphore acquisition mechanism
- ZEP-SRS-5-7 Semaphore acquisition with count greater than zero
- ZEP-SRS-5-8 Semaphore acquisition with zero count
- ZEP-SRS-5-9 Semaphore acquisition timeout
- ZEP-SRS-5-10 Semaphore acquisition timeout error handling
- ZEP-SRS-5-11 Semaphore acquisition no wait error handling
- ZEP-SRS-5-12 Semaphore release
- ZEP-SRS-5-13 Semaphore release
- ZEP-SRS-5-14 Semaphore release with priority inheritance
- ZEP-SRS-5-15 Checking semaphore count
- ZEP-SRS-5-16 Semaphore reset
- ZEP-SRS-5-17 Semaphore acquisitions abort after reset
- ZEP-SRS-5-18 Semaphore Initialization Option Validation
The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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. 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.
-
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.
-
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.
-
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.
-
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.
-
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. Threads
- ZEP-SRS-2-4 Scheduling a thread based on an event
- ZEP-SRS-1-1 Creating threads
- ZEP-SRS-1-3 Suspending a thread
- ZEP-SRS-1-4 Resuming a suspended thread
- ZEP-SRS-1-5 Resuming a suspended thread after a timeout
- ZEP-SRS-1-6 Deleting a thread
- ZEP-SRS-1-7 Thread states
- ZEP-SRS-1-8 Thread stack objects
- ZEP-SRS-1-9 Thread privileges
- ZEP-SRS-1-11 Thread Options
- ZEP-SRS-1-12 Thread Custom Data
The Zephyr RTOS shall support threads.
As a Zephyr RTOS user, I want to be able to have support for the kernel objects named threads for processing work.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
- ZEP-SRS-1-1 Creating threads
- ZEP-SRS-1-3 Suspending a thread
- ZEP-SRS-1-4 Resuming a suspended thread
- ZEP-SRS-1-5 Resuming a suspended thread after a timeout
- ZEP-SRS-1-6 Deleting a thread
- ZEP-SRS-1-7 Thread states
- ZEP-SRS-1-8 Thread stack objects
- ZEP-SRS-1-9 Thread privileges
- ZEP-SRS-1-10 Scheduling multiple threads
- ZEP-SRS-1-11 Thread Options
- ZEP-SRS-1-12 Thread Custom Data
The Zephyr RTOS shall provide a framework for managing multiple threads of execution.
As a Zephyr RTOS user, I want to be able to manage the execute of multiple threads with different priorities.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
Threads shall have a priority.
As a Zephyr RTOS user, I want to be able to give my threads different priorities for execution.
-
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.
- ZEP-SRS-4-1 Timer definition at compile time
- ZEP-SRS-4-2 Timer expiry function
- ZEP-SRS-4-3 Timer stop function
- ZEP-SRS-4-4 Timer definition at run time
- ZEP-SRS-4-5 Timer start
- ZEP-SRS-4-6 Timer stop
- ZEP-SRS-4-7 Timer status
- ZEP-SRS-4-8 Timer status reinitialization
- ZEP-SRS-4-9 Timer thread synchronization
- ZEP-SRS-4-10 Timer next expiration time in system ticks
- ZEP-SRS-4-11 Timer remaining time until expiration in system ticks
- ZEP-SRS-4-12 Timer remaining time until expiration in milliseconds
- ZEP-SRS-4-13 Timer set user data
- ZEP-SRS-4-14 Timer get user data
- ZEP-SRS-4-15 Timer expire functions in interrupt context
The Zephyr RTOS shall provide a framework for managing time-based events.
As a Zephyr RTOS user, I want to start, suspend, resume and stop timers which shall trigger an event on a set expiration time.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
Zepyhr shall provide a framework mechanism for tracing low level system operations (NOTE: system calls, interrupts, kernel calls, thread, synchronization, etc.).
As a Zephyr RTOS user, I want to be able to trace different OS operations.
17. Condition Variables
- ZEP-SRS-24-11 Queue definition at compile time
- ZEP-SRS-20-1 Queue definition at compile time
- ZEP-SRS-20-2 Queue definition at run time.
- ZEP-SRS-20-3 Queue enqueue item to the back
- ZEP-SRS-20-4 Queue enqueue item to the front
- ZEP-SRS-20-5 Queue remove item
- ZEP-SRS-20-6 Queue get and dequeue item from front
- ZEP-SRS-20-7 Queue empty check
- ZEP-SRS-20-8 Queue peek item at back
- ZEP-SRS-20-9 Queue peek item at front
- ZEP-SRS-20-10 Queue insert
- ZEP-SRS-20-11 Queue append item list to the back
- ZEP-SRS-20-12 Queue append and empty item list to the back
- ZEP-SRS-20-13 Queue append unique data item
- ZEP-SRS-20-14 Queue implicit memory allocation
The Zephyr RTOS shall provide a framework to synchronize threads based on a condition variable.
-
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.
-
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.
-
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.
-
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).
-
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).
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
18. Queues
The Zephyr RTOS shall implement a queue which can be used to pass data between threads and interrupt service routines.
19. LIFOs
The Zephyr RTOS shall implement a LIFOs which can be used to pass data between threads and interrupt service routines.
-
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.
-
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).
-
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.
-
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.
-
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.
20. FIFOs
- ZEP-SRS-24-1 FIFO definition at compile time
- ZEP-SRS-24-2 FIFO cancel waiting thread
- ZEP-SRS-24-3 FIFO enqueue item to the back
- ZEP-SRS-24-4 FIFO implicit memory allocation
- ZEP-SRS-24-5 FIFO append item list to the back
- ZEP-SRS-24-6 FIFO append and empty item list to the back
- ZEP-SRS-24-7 FIFO get and dequeue item from front
- ZEP-SRS-24-8 FIFO empty check
- ZEP-SRS-24-9 FIFO peek item at front
- ZEP-SRS-24-10 FIFO peek item at back
The Zephyr RTOS shall implement FIFOs which can be used to pass data between threads and interrupt service routines.
-
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.
-
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.
-
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).
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.