Added initial mutex and semaphore support.