* eval.c (rb_thread_start_0): prevent thread from GC.
[ruby-dev:21572] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8022abdc69
commit
67a98cd52f
@ -1,3 +1,8 @@
|
|||||||
|
Thu Oct 9 23:50:21 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (rb_thread_start_0): prevent thread from GC.
|
||||||
|
[ruby-dev:21572]
|
||||||
|
|
||||||
Thu Oct 9 19:11:44 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Oct 9 19:11:44 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c (rb_thread_start_0): non-volatile should be restored from
|
* eval.c (rb_thread_start_0): non-volatile should be restored from
|
||||||
|
3
eval.c
3
eval.c
@ -9385,6 +9385,7 @@ rb_thread_start_0(fn, arg, th)
|
|||||||
rb_thread_t th;
|
rb_thread_t th;
|
||||||
{
|
{
|
||||||
volatile rb_thread_t th_save = th;
|
volatile rb_thread_t th_save = th;
|
||||||
|
volatile VALUE thread = th->thread;
|
||||||
struct BLOCK *volatile saved_block = 0, *block;
|
struct BLOCK *volatile saved_block = 0, *block;
|
||||||
enum thread_status status;
|
enum thread_status status;
|
||||||
int state;
|
int state;
|
||||||
@ -9408,7 +9409,7 @@ rb_thread_start_0(fn, arg, th)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (THREAD_SAVE_CONTEXT(curr_thread)) {
|
if (THREAD_SAVE_CONTEXT(curr_thread)) {
|
||||||
return th_save->thread;
|
return thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ruby_block) { /* should nail down higher blocks */
|
if (ruby_block) { /* should nail down higher blocks */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user