Ooops - avoid a return NULL in function returning void.
Make sure the lock() and unlock() interface is adhered to in MCS lock.