On 29 September 2014 16:41, niXman wrote: > > Hi, > > I trying to understand why '__gthread_active_p()' is checked only in few > functions, and why exactly in this functions? > > For example, '__gthread_active_p()' is used in > '__gthread_mutex_init_function()' but not used for example in > '__gthread_[g|s]etspecific()'? Why? 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.