]> git.ipfire.org Git - thirdparty/bind9.git/commit
Use library constructor to create default mutex attr once
authorOndřej Surý <ondrej@isc.org>
Wed, 13 Jul 2022 11:19:32 +0000 (11:19 +020)
committerMichał Kępień <michal@isc.org>
Wed, 13 Jul 2022 11:19:32 +0000 (11:19 +020)
commitaadb5e95a2ae98e492c6331c319c495229ea7015
tree2e67d0ce16a8393782e7eb3d367d33baab04725d
parent76d2a97ed279249fd5bc85695dcfa9a782dca3ad
Use library constructor to create default mutex attr once

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.
lib/isc/Makefile.am
lib/isc/lib.c
lib/isc/mutex.c
lib/isc/mutex_p.h [new file with mode: 0644]