Implemented thread wakeup from semaphore sleep