Support pthread_self and pthread_mutex_trylock