From 12c890c1ca09bdd77fd653d247b13f1c22ea3f0a Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 27 Jul 2018 16:57:45 +0300 Subject: [PATCH] Added OpenBSD 3.9 getthrid(). Prodded by David Carlier. --- src/nxt_thread_id.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/nxt_thread_id.h b/src/nxt_thread_id.h index eba191ea..3263a47a 100644 --- a/src/nxt_thread_id.h +++ b/src/nxt_thread_id.h @@ -80,6 +80,18 @@ nxt_thread_get_tid(void) * return pthread_mach_thread_np(pthread_self()); */ +#elif (NXT_OPENBSD) + +typedef pid_t nxt_tid_t; + +/* OpenBSD 3.9 getthrid(). */ + +nxt_inline nxt_tid_t +nxt_thread_get_tid(void) +{ + return getthrid(); +} + #elif (NXT_AIX) /*