Slide 1
Slide 2
Slide 3
Slide 4
Slide 5
Slide 6
Slide 7
Slide 8
Slide 9
Slide 10
Slide 11
Product List
Here is an example where the task is running and calls Semaphore_pend() just like in the last example. But in this case, the count of mySem (which is obviously a counting semaphore and not a binary semaphore) is 2. So the call to Semaphore_pend() decrements the semaphore’s count from 2 to 1, but since the count is not zero, the task does not block. Only pending on a semaphore with a count of zero will cause the task to block.
PTM Published on: 2012-07-19