Semaphore design