Zephyr Project Requirements
Mutex
  • ZEP-SYRS-13
    13.1. Mutex ZEP-SYRS-13

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

ZEP-SRS-6-1
1. Mutex Kernel Object ZEP-SRS-6-1

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

  • ZEP-SYRS-13
    13.1. Mutex ZEP-SYRS-13

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

ZEP-SRS-6-2
2. Mutex definition at compile time ZEP-SRS-6-2

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

  • ZEP-SYRS-13
    13.1. Mutex ZEP-SYRS-13

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

ZEP-SRS-6-3
3. Mutex definition at run time ZEP-SRS-6-3

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

  • ZEP-SYRS-13
    13.1. Mutex ZEP-SYRS-13

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

ZEP-SRS-6-4
4. Locking a mutex ZEP-SRS-6-4

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

  • ZEP-SYRS-13
    13.1. Mutex ZEP-SYRS-13

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

ZEP-SRS-6-5
5. Locking an unowned mutex ZEP-SRS-6-5

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

  • ZEP-SYRS-13
    13.1. Mutex ZEP-SYRS-13

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

ZEP-SRS-6-6
6. Locking a mutex owned by another thread ZEP-SRS-6-6

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-SYRS-13
    13.1. Mutex ZEP-SYRS-13

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

ZEP-SRS-6-7
7. Mutex lock timeout ZEP-SRS-6-7

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-SYRS-13
    13.1. Mutex ZEP-SYRS-13

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

ZEP-SRS-6-8
8. Mutex lock timeout expiry ZEP-SRS-6-8

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-SYRS-13
    13.1. Mutex ZEP-SYRS-13

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

ZEP-SRS-6-9
9. Recursive mutex locking ZEP-SRS-6-9

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-SYRS-13
    13.1. Mutex ZEP-SYRS-13

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

ZEP-SRS-6-10
10. Unlocking a mutex ZEP-SRS-6-10

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

  • ZEP-SYRS-13
    13.1. Mutex ZEP-SYRS-13

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

ZEP-SRS-6-11
11. Unlocking by a non-owner ZEP-SRS-6-11

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-SYRS-13
    13.1. Mutex ZEP-SYRS-13

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

ZEP-SRS-6-12
12. Priority inheritance ZEP-SRS-6-12

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.