diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-24 15:42:41 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-24 15:42:41 +0000 |
commit | 97ba019c9410ccb5ec76f6b54fd2e140b7583038 (patch) | |
tree | f3d3c428b2fa8b14e801896c25d5d78a4e4cd91d /thread.c | |
parent | a5c2d584284e2b137b1d4d06574470a971c9087e (diff) |
* vm.c: some refactoring.
* rename th_* to vm_*.
* remove unused variables functions.
* add prototypes.
* blockinlining.c, compile.c, cont.c, eval.c, eval_intern.h,
eval_jump.h, eval_load.c, inits.c, insns.def, iseq.c, parse.y,
proc.c, process.c, signal.c, thread.c, vm.c, vm_dump.c,
vm_evalbody.ci, yarvcore.c, yarvcore.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -81,7 +81,6 @@ st_delete_wrap(st_table * table, VALUE key) #define THREAD_SYSTEM_DEPENDENT_IMPLEMENTATION static rb_unblock_function_t* set_unblock_function(rb_thread_t *th, rb_unblock_function_t *func); -static void clear_unblock_function(rb_thread_t *th); NOINLINE(void rb_gc_set_stack_end(VALUE **stack_end_p)); NOINLINE(void rb_gc_save_machine_context(rb_thread_t *)); @@ -211,14 +210,6 @@ set_unblock_function(rb_thread_t *th, rb_unblock_function_t *func) } static void -clear_unblock_function(rb_thread_t *th) -{ - native_mutex_lock(&th->interrupt_lock); - th->unblock_function = 0; - native_mutex_unlock(&th->interrupt_lock); -} - -static void rb_thread_interrupt(rb_thread_t *th) { native_mutex_lock(&th->interrupt_lock); @@ -314,7 +305,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start th->errinfo = Qnil; th->local_lfp = proc->block.lfp; th->local_svar = Qnil; - th->value = th_invoke_proc(th, proc, proc->block.self, + th->value = vm_invoke_proc(th, proc, proc->block.self, RARRAY_LEN(args), RARRAY_PTR(args)); } else { @@ -393,8 +384,6 @@ rb_thread_create(VALUE (*fn)(ANYARGS), void *arg) /* +infty, for this purpose */ #define DELAY_INFTY 1E30 -VALUE th_make_jump_tag_but_local_jump(int state, VALUE val); - static VALUE thread_join(rb_thread_t *target_th, double delay) { @@ -435,7 +424,7 @@ thread_join(rb_thread_t *target_th, double delay) /* */ } else if (TYPE(target_th->errinfo) == T_NODE) { - rb_exc_raise(th_make_jump_tag_but_local_jump( + rb_exc_raise(vm_make_jump_tag_but_local_jump( GET_THROWOBJ_STATE(err), GET_THROWOBJ_VAL(err))); } else { @@ -2716,7 +2705,6 @@ static void call_trace_func(rb_event_flag_t, VALUE data, VALUE self, ID id, VALU static VALUE set_trace_func(VALUE obj, VALUE trace) { - rb_vm_t *vm = GET_VM(); rb_remove_event_hook(call_trace_func); if (NIL_P(trace)) { |