Add the semaphore example which can run on the Mac OS X