Added semaphore implementation

* fix docs