void VM::set_current(VM* vm) { _current_vm.set(vm); }
void NativeMethod::init_thread(STATE) { NativeMethodEnvironment* env = new NativeMethodEnvironment(state); native_method_environment.set(env); }
void NativeMethod::cleanup_thread(STATE) { delete native_method_environment.get(); native_method_environment.set(NULL); }
void VM::set_current(VM* vm) { vm->os_thread_ = pthread_self(); _current_vm.set(vm); }