diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-24 07:05:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-24 07:05:28 +0000 |
commit | 789612882294ffc91de0acb3621e9ddbcfba8822 (patch) | |
tree | e731579cc67cba7df0fa93334ec39291ffba6844 /eval.c | |
parent | c1008ab51b5a01f541136a5920f665a7edd10205 (diff) |
* configure.in (AC_C_VOLATILE): check if volatile works.
* defines.h (volatile): removed.
* eval.c (rb_thread_group): Thread#group. [new]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -9178,6 +9178,17 @@ rb_thread_abort_exc_set(thread, val) return val; } +VALUE +rb_thread_group(thread) + VALUE thread; +{ + VALUE group = rb_thread_check(thread)->thgroup; + if (!group) { + group = Qnil; + } + return group; +} + #define THREAD_ALLOC(th) do {\ th = ALLOC(struct thread);\ \ @@ -10024,6 +10035,7 @@ Init_Thread() rb_define_method(rb_cThread, "priority", rb_thread_priority, 0); rb_define_method(rb_cThread, "priority=", rb_thread_priority_set, 1); rb_define_method(rb_cThread, "safe_level", rb_thread_safe_level, 0); + rb_define_method(rb_cThread, "group", rb_thread_group, 0); rb_define_method(rb_cThread, "[]", rb_thread_aref, 1); rb_define_method(rb_cThread, "[]=", rb_thread_aset, 2); |