Pthread and mutexes tests.