зеркало из https://github.com/github/ruby.git
* 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:
Родитель
340a511fdf
Коммит
b33ea38a9b
|
@ -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>
|
Thu Nov 20 12:42:47 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
* configure.in: always check existence of the pthread library
|
* 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
|
#ifdef HAVE_NATIVETHREAD
|
||||||
static rb_nativethread_t ruby_thid;
|
static rb_nativethread_t ruby_thid;
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
is_ruby_native_thread() {
|
is_ruby_native_thread() {
|
||||||
|
#ifdef HAVE_NATIVETHREAD
|
||||||
return NATIVETHREAD_EQUAL(ruby_thid, NATIVETHREAD_CURRENT());
|
return NATIVETHREAD_EQUAL(ruby_thid, NATIVETHREAD_CURRENT());
|
||||||
}
|
#else
|
||||||
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ruby_init()
|
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 NATIVETHREAD_EQUAL(t1,t2) ((t1) == (t2))
|
||||||
# define HAVE_NATIVETHREAD
|
# define HAVE_NATIVETHREAD
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_NATIVETHREAD
|
|
||||||
RUBY_EXTERN int is_ruby_native_thread();
|
RUBY_EXTERN int is_ruby_native_thread();
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
} /* extern "C" { */
|
} /* extern "C" { */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче