Add mechanism to reset/lock semaphores