summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorYuta Saito <kateinoigakukun@gmail.com>2022-01-16 00:37:09 +0900
committerYuta Saito <kateinoigakukun@gmail.com>2022-01-19 11:19:06 +0900
commitd6d52a7d049fd802b37d0f594629bad2cdc6b8c2 (patch)
treeb6f0efdba5823ace0919289ba8a4e7a06adf8b35 /thread_pthread.c
parentbf1c4d254beb0e01fac1d9e6cb805de8ec6260eb (diff)
thread.c: put platform specific part in each impl file
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5407
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 6f0cc3d54c..55289de73a 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -47,6 +47,13 @@
# define USE_EVENTFD (0)
#endif
+#define DEBUG_OUT() \
+ pthread_mutex_lock(&debug_mutex); \
+ printf(POSITION_FORMAT"%"PRI_THREAD_ID" - %s" POSITION_ARGS, \
+ fill_thread_id_string(pthread_self(), thread_id_string), buf); \
+ fflush(stdout); \
+ pthread_mutex_unlock(&debug_mutex);
+
#if defined(SIGVTALRM) && !defined(__CYGWIN__) && !defined(__EMSCRIPTEN__)
# define USE_UBF_LIST 1
#endif