On 29 September 2014 20:48, niXman wrote: > Jonathan Wakely 2014-09-29 20:38: >> >> On 29 September 2014 16:41, niXman wrote: > > >> Some of the functions are short and calling them without active >> threads does nothing, so there's no need to check. >> __ghtread_mutex_init_function makes several calls, so if they are all >> going to do nothing then there's no point calling any of them. > > > What do you mean by "functions are short and calling them without active > threads does nothing"? I mean exactly what I wrote. __gthread_mutex_lock is a one-line function that forwards to pthread_mutex_lock. Using GNU libc if you don't link to libpthread.so then pthread_mutex_lock is a no-op function that does nothing. It is quicker to just call it than to spend time checking if threads are active.