mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 02:39:59 -04:00
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:
commit
096479cc19
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue