K 10 svn:author V 7 davidxu K 8 svn:date V 27 2012-04-05T03:05:02.501204Z K 7 svn:log V 300 In sem_post, the field _has_waiters is no longer used, because some application destroys semaphore after sem_wait returns. Just enter kernel to wake up sleeping threads, only update _has_waiters if it is safe. While here, check if the value exceed SEM_VALUE_MAX and return EOVERFLOW if this is true. END