Changed mutexes in scheduler.c to restrict.