Zephyr Project Requirements
Events

Events

STATEMENT:

SPDX-License-Identifier: Apache-2.0

1. Event Object Definition

ZEP-SRS-27-1
1.1. Event object definition at compile time
UID: ZEP-SRS-27-1
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

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

ZEP-SRS-27-2
1.2. Event object definition at run time
UID: ZEP-SRS-27-2
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

The Zephyr RTOS shall provide a mechanism to initialize an event object at run time.

ZEP-SRS-27-3
1.3. Number of distinct events
UID: ZEP-SRS-27-3
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

The Zephyr RTOS shall provide an event object capable of tracking up to 32 distinct events.

2. Delivering Events

ZEP-SRS-27-4
2.1. Posting events
UID: ZEP-SRS-27-4
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

The Zephyr RTOS shall provide a mechanism to post one or more events to an event object, merging them with the events currently tracked by the event object.

ZEP-SRS-27-5
2.2. Setting events
UID: ZEP-SRS-27-5
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

The Zephyr RTOS shall provide a mechanism to set the events tracked by an event object to a specified value, replacing the events currently tracked by the event object.

ZEP-SRS-27-6
2.3. Setting and clearing events using a mask
UID: ZEP-SRS-27-6
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

The Zephyr RTOS shall provide a mechanism to set the events selected by a mask to specified values, leaving the events tracked by the event object that are not selected by the mask unchanged.

ZEP-SRS-27-7
2.4. Clearing events
UID: ZEP-SRS-27-7
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

The Zephyr RTOS shall provide a mechanism to clear specified events tracked by an event object.

ZEP-SRS-27-8
2.5. Reporting the previous events
UID: ZEP-SRS-27-8
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

When the events tracked by an event object are modified, the Zephyr RTOS shall report the value that the modified events had before the operation.

ZEP-SRS-27-9
2.6. Unpending threads whose conditions are met
UID: ZEP-SRS-27-9
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

When a modification of the events tracked by an event object satisfies the waiting condition of a thread waiting on that event object, the Zephyr RTOS shall unpend that thread.

3. Waiting for Events

ZEP-SRS-27-10
3.1. Waiting for any of a set of events
UID: ZEP-SRS-27-10
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

The Zephyr RTOS shall provide a mechanism for a thread to wait until any of a specified set of events is tracked by an event object.

ZEP-SRS-27-11
3.2. Waiting for all of a set of events
UID: ZEP-SRS-27-11
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

The Zephyr RTOS shall provide a mechanism for a thread to wait until all of a specified set of events are tracked by an event object.

ZEP-SRS-27-12
3.3. Event wait timeout
UID: ZEP-SRS-27-12
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

When a thread waits on an event object, the Zephyr RTOS shall accept a timeout that specifies the maximum time to wait for the desired set of events.

ZEP-SRS-27-13
3.4. Event wait timeout expiry
UID: ZEP-SRS-27-13
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

When the timeout of a thread waiting on an event object elapses before the desired set of events is satisfied, the Zephyr RTOS shall report that no matching events were delivered.

ZEP-SRS-27-14
3.5. Reporting matching events on wait completion
UID: ZEP-SRS-27-14
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

When a thread waiting on an event object completes its wait successfully, the Zephyr RTOS shall report the set of events that matched the waiting condition.

ZEP-SRS-27-15
3.6. Resetting events before waiting
UID: ZEP-SRS-27-15
STATUS: Draft
TYPE: Functional
COMPONENT: Events
RELATIONS (Parent):
STATEMENT:

When a thread waits on an event object, the Zephyr RTOS shall accept an option to clear the events tracked by the event object before the wait begins.