returning the error directly. For sem_post(), make sure that the correct thread is woken up. This has unfortunate performance implications, but is necessary for POSIX compliance. Approved by: jkh