binary semaphore + buffer