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.