a semaphore example (POSIX one)