mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ruby.h: define is_ruby_native_thread() for no native thread environment
* eval.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
340a511fdf
commit
b33ea38a9b
3 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
Thu Nov 20 13:37:34 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ruby.h: define is_ruby_native_thread() for no native thread
|
||||
environment
|
||||
|
||||
* eval.c: ditto
|
||||
|
||||
Thu Nov 20 12:42:47 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* configure.in: always check existence of the pthread library
|
||||
|
|
7
eval.c
7
eval.c
|
@ -1159,11 +1159,16 @@ void Init_ext _((void));
|
|||
|
||||
#ifdef HAVE_NATIVETHREAD
|
||||
static rb_nativethread_t ruby_thid;
|
||||
#endif
|
||||
|
||||
int
|
||||
is_ruby_native_thread() {
|
||||
#ifdef HAVE_NATIVETHREAD
|
||||
return NATIVETHREAD_EQUAL(ruby_thid, NATIVETHREAD_CURRENT());
|
||||
}
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
ruby_init()
|
||||
|
|
2
ruby.h
2
ruby.h
|
@ -682,9 +682,7 @@ typedef DWORD rb_nativethread_t;
|
|||
# define NATIVETHREAD_EQUAL(t1,t2) ((t1) == (t2))
|
||||
# define HAVE_NATIVETHREAD
|
||||
#endif
|
||||
#ifdef HAVE_NATIVETHREAD
|
||||
RUBY_EXTERN int is_ruby_native_thread();
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} /* extern "C" { */
|
||||
|
|
Loading…
Reference in a new issue