Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add condition variables requirements #77

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions docs/software_requirements/condition_variables.sdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
[DOCUMENT]
TITLE: Condition Variables
REQ_PREFIX: ZEP-SRS-21-

[GRAMMAR]
IMPORT_FROM_FILE: software_requirements.sgra

[REQUIREMENT]
UID: ZEP-SRS-21-1
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
TITLE: Dynamic initialization of condition variables
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism to define and initialize a condition variable dynamically (at runtime).
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-20

[REQUIREMENT]
UID: ZEP-SRS-21-2
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
TITLE: Static initialization of condition variables
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism to define and initialize a condition variable statically (at compile time).
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-20

[REQUIREMENT]
UID: ZEP-SRS-21-3
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
TITLE: Signal one waiting thread
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism to signal the highest priorite waiting thread when a condition is met.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-20

[REQUIREMENT]
UID: ZEP-SRS-21-4
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
TITLE: Signal multiple waiting threads
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism to signal all waiting threads when a condition is met.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-20

[REQUIREMENT]
UID: ZEP-SRS-21-5
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
TITLE: Wait on a condition variable
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism for a thread to wait on a condition variable.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-20

[REQUIREMENT]
UID: ZEP-SRS-21-6
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
TITLE: Wait timeout on a condition variable
STATEMENT: >>>
When waiting on a condition variable, the thread shall specify a timeout value.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-20

[REQUIREMENT]
UID: ZEP-SRS-21-7
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
TITLE: Wait timeout occurence
STATEMENT: >>>
When a timeout occurs while waiting on a condition variable, the thread shall be unblocked and a timeout error shall be returned.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-20

[REQUIREMENT]
UID: ZEP-SRS-21-8
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
TITLE: Release mutex on wait
STATEMENT: >>>
If a thread is waiting on a condition variable, the thread shall release the current owned mutex independently.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-20

[REQUIREMENT]
UID: ZEP-SRS-21-9
STATUS: Draft
TYPE: Functional
COMPONENT: Condition Variables
TITLE: Unblock a waiting thread
STATEMENT: >>>
henever some thread signals a condition variable the Zephyr RTOS shall unblock the highest priority thread currently waiting for this condition variable.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-20
3 changes: 3 additions & 0 deletions docs/software_requirements/index.sdoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ FILE: timers.sdoc

[DOCUMENT_FROM_FILE]
FILE: tracing.sdoc

[DOCUMENT_FROM_FILE]
FILE: condition_variables.sdoc
15 changes: 15 additions & 0 deletions docs/system_requirements/index.sdoc
Original file line number Diff line number Diff line change
Expand Up @@ -293,3 +293,18 @@ Zepyhr shall provide a framework mechanism for tracing low level system operatio
USER_STORY: >>>
As a Zephyr RTOS user, I want to be able to trace different OS operations.
<<<

[SECTION]
TITLE: Condition Variables

[REQUIREMENT]
UID: ZEP-SYRS-21
STATUS: Draft
TYPE: Non-Functional
COMPONENT: Condition Variables
TITLE: Condition Variables
STATEMENT: >>>
The Zephyr RTOS shall provide a framework to synchronize threads based on a condition variable.
<<<

[/SECTION]
Loading