modified mutex.c