K 10 svn:author V 7 davidxu K 8 svn:date V 27 2010-02-08T07:31:05.585826Z K 7 svn:log V 126 Set waiters flag before checking semaphore's counter, otherwise we might lose a wakeup. Tested on postgresql database server. END