History

Alter VM fork() API to just consume the ID of the parent rather than the parent instance.

arr committed 10 years ago

Commit fcc75fd1 parent 093cfc13 files · +5 −5Browse files

Showing the changes to src/vm/vm.cpp (1 of 3 files). Show all

Unified · Split

src/vm/vm.cpp+2−2
@@ -104,7 +104,7 @@ const runtime::vm_thread_t& vm_t::exec(std::unique_ptr<runtime::vm_module_t> ent · 103 unmodified lines
104104 }
105105
106106 const runtime::vm_thread_t& vm_t::fork(
107− const runtime::vm_thread_t &parent,
107+ const uint32_t parent_tid,
108108 runtime::vm_module_ref_t &module_ref,
109109 const runtime::vm_frame_t &initial_frame,
110110 runtime::vm_pc_t initial_pc)
@@ -112,7 +112,7 @@ const runtime::vm_thread_t& vm_t::fork( · 1 unmodified line
112112 if (initial_pc < 0 || static_cast<vm_pc_t>(module_ref.code_section.size()) <= initial_pc)
113113 throw vm_system_exception{ "Invalid entry program counter" };
114114
115− auto thread = std::make_unique<vm_thread_t>(module_ref, parent.get_thread_id(), initial_frame, initial_pc);
115+ auto thread = std::make_unique<vm_thread_t>(module_ref, parent_tid, initial_frame, initial_pc);
116116 return schedule_thread(std::move(thread));
117117 }
118118