Almost done, only semaphore operations are pending.