Should pthread_mutex_destroy() return an error if the mutex is locked? pthreads-win32 seems to disagree with the linux implementation of pthreads on this point (OK on windows, not on linux).