summaryrefslogtreecommitdiff
path: root/sysdep/unix/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/log.c')
-rw-r--r--sysdep/unix/log.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c
index c200db38..d929e80e 100644
--- a/sysdep/unix/log.c
+++ b/sysdep/unix/log.c
@@ -37,11 +37,9 @@ static FILE *dbgf;
static list *current_log_list;
static char *current_syslog_name; /* NULL -> syslog closed */
-static _Atomic uint max_thread_id = ATOMIC_VAR_INIT(1);
+_Atomic uint max_thread_id = ATOMIC_VAR_INIT(1);
_Thread_local uint this_thread_id;
-#define THIS_THREAD_ID (this_thread_id ?: (this_thread_id = atomic_fetch_add_explicit(&max_thread_id, 1, memory_order_acq_rel)))
-
#include <pthread.h>
static pthread_mutex_t log_mutex;