diff options
| author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-20 04:39:08 +0000 |
|---|---|---|
| committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-20 04:39:08 +0000 |
| commit | 14e8bd6b2e44c3b9a7004b6c708abc125e68103b (patch) | |
| tree | 817e3dbb30b817ab9b75be0eb7b1c92b4378e93a | |
| parent | f2abcf859086b144c188c50d30d21bfe3f0fc223 (diff) | |
| download | ruby-14e8bd6b2e44c3b9a7004b6c708abc125e68103b.tar.gz ruby-14e8bd6b2e44c3b9a7004b6c708abc125e68103b.tar.xz ruby-14e8bd6b2e44c3b9a7004b6c708abc125e68103b.zip | |
* ruby.h: define is_ruby_native_thread() for no native thread environment
* eval.c: ditto
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | eval.c | 7 | ||||
| -rw-r--r-- | ruby.h | 2 |
3 files changed, 13 insertions, 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 @@ -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() @@ -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" { */ |
