Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Product List
SYS/BIOS Semaphores Slide 5

Shown here is how a task can un-block, one has two tasks: a low priority task that is in the running state and a high priority task that is blocked on a Semaphore_pend() call. The running low priority task will call Semaphore_post() on the semaphore. At that instant, the BIOS scheduler will make the high priority task ready to run and since it is the highest priority thread at that point, it will actually start running. Note that the count of the semaphore is still zero. That is because, Semaphore_post() was called, the hi priority task immediately completed its Semaphore_pend() call, which took the value of the semaphore back to 0.

PTM Published on: 2012-07-19