Create Semaphore

Found on http://stackoverflow.com/questions/34519/what-is-a-semaphore