Further refining of semaphore foundation