Now I remember ... FindWaitingThread(NULL) is outside any type of lock/synchronization object.  I therefore assume that a race condition exists between its scan and the proposed "if" block.  Instead of attempting to prove / disprove the race condition, I took the safe path of always calling sem_post.  This code is already overdue and the optimization is not worth it.