fix: dev: Only update the global tid_count once

Skip updating the `tid_count` value on repeated calls to prevent ThreadSanitizer 'data race'.

Merge branch 'ondrej/skip-repeated-tid_count-update' into 'main'

See merge request isc-projects/bind9!12186
This commit is contained in:
Ondřej Surý 2026-06-04 12:39:06 +02:00
commit 096479cc19

View file

@ -11,7 +11,6 @@
* information regarding copyright ownership.
*/
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
@ -45,7 +44,9 @@ void
isc__tid_initcount(isc_tid_t count) {
REQUIRE(tid_count == 0 || tid_count == count);
REQUIRE(count < ISC_TID_MAX);
tid_count = count;
if (tid_count == 0) {
tid_count = count;
}
}
/**