summaryrefslogtreecommitdiff
path: root/thread_win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread_win32.c')
-rw-r--r--thread_win32.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/thread_win32.c b/thread_win32.c
index 8b5120be3c..fc31c09ec3 100644
--- a/thread_win32.c
+++ b/thread_win32.c
@@ -835,6 +835,14 @@ native_set_thread_name(rb_thread_t *th)
{
}
+static VALUE
+native_thread_native_thread_id(rb_thread_t *th)
+{
+ DWORD tid = GetThreadId(th->thread_id);
+ if (tid == 0) rb_sys_fail("GetThreadId");
+ return ULONG2NUM(tid);
+}
+
#if USE_MJIT
static unsigned long __stdcall
mjit_worker(void *arg)