Instead of using isc_once_do() on every isc_mutex_init() call, use the global library constructor to initialize the default mutex attr object (optionally with PTHREAD_MUTEX_ADAPTIVE_NP if supported) just once when the library is loaded.