How pthread_once() is implemented internally?
<p>Do we use any locking mechanism inside pthread_once()? What is the cost of using pthread_once() instead of using pthread_mutex_lock() and pthread_mutex_unlock() in the threadsafe singleton class?</p>