ruby: init JNI context
@@ -434,6 +434,11 @@ ruby_thread_init_stack(rb_thread_t *th)
native_thread_init_stack(th);
}
+//RHO
+ void *rho_nativethread_start();
+ void rho_nativethread_end(void *);
+ //RHO
+
static int
thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_start)
{
@@ -451,6 +456,10 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
ruby_thread_set_native(th);
+ //RHO
+ void* rho_thread = rho_nativethread_start();
+ //RHO
+
th->machine_stack_start = stack_start;
#ifdef __ia64
th->machine_register_stack_start = register_stack_start;
@@ -554,6 +563,10 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
native_mutex_unlock(&th->vm->global_vm_lock);
}
+ //RHO
+ rho_nativethread_end(rho_thread);
+ //RHO
+
return 0;
}
