From b2bcef7294d1a65363773cfc97ade6bd286ee63a Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 23 Jul 2013 10:46:37 +0000 Subject: * thread_native.h: add rb_nativethread_self() which returns current running native thread identifier. * thread_[pthread|win32].c: implement rb_nativethread_self(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'thread_pthread.c') diff --git a/thread_pthread.c b/thread_pthread.c index e13e26786e..1b4ec10b98 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -1535,4 +1535,10 @@ rb_reserved_fd_p(int fd) #endif } +rb_nativethread_id_t +rb_nativethread_self(void) +{ + return pthread_self(); +} + #endif /* THREAD_SYSTEM_DEPENDENT_IMPLEMENTATION */ -- cgit v1.2.3