Zephyr Project Requirements
Semaphores
  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Counting Semaphore Definition At Compile Time ZEP-SRS-5-1

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

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Counting Semaphore Definition At Run Time ZEP-SRS-5-2

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

Maximum limit of a semaphore ZEP-SRS-5-3

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.

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Initialialization with maximum count value ZEP-SRS-5-4

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

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Initial semaphore value ZEP-SRS-5-5

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

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Semaphore acquisition mechanism ZEP-SRS-5-6

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

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Semaphore acquisition with count greater than zero ZEP-SRS-5-7

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

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Semaphore acquisition with zero count ZEP-SRS-5-8

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

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Semaphore acquisition timeout ZEP-SRS-5-9

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.

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Semaphore acquisition timeout error handling ZEP-SRS-5-10

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.

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Semaphore acquisition no wait error handling ZEP-SRS-5-11

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.

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Semaphore release ZEP-SRS-5-12

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

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Semaphore release ZEP-SRS-5-13

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

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Semaphore release with priority inheritance ZEP-SRS-5-14

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

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Checking semaphore count ZEP-SRS-5-15

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

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Semaphore reset ZEP-SRS-5-16

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

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Semaphore acquisitions abort after reset ZEP-SRS-5-17

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

  • Counting Semaphore ZEP-SYRS-14

    The system shall implement a semaphore synchronization primitive for coordinating access to shared resources among multiple threads.

Semaphore Initialization Option Validation ZEP-SRS-5-18

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.