Switched mcdbg to use ReentrantLock instead of Semaphore where appropriate