coded semaphores, bad semaphores