Updated mutex.c and device.c