In NicheStack, the semaphore acts as a signaling mechanism to notify a event occurrence. This notification will allow the waiting task to resume it's execution. Nichestack only supports the binary semaphore. Nichestack supports both signaling from ISR and task.
Nichestack contains a main semaphore, which will be signaled while we receive any incoming data on the drivers. This will unlock the waiting semaphore inside the main task and thereby dequeues the incoming packet and based on the type it will send to relevant upper layers. The main semaphore will be created during the main task module initialization.
During signaling the task ID will be passed along with the semaphore ID and using this, the stack will understood the consumer task. Semaphore wait can be blocking or non-blocking based on the timeout value passed along with the semaphore ID. Unlike the mutexes, the semaphores are created during the module initialization.
Use case Diagram of the Interniche Semaphore Signaling
No comments:
Post a Comment