History

Remove vm_thread reference from exec/fork vm functions.

arr committed 9 years ago

Commit a64d7751 parent 98ad0165 files · +30 −23Browse files

Showing the changes to src/include (2 of 5 files). Show all

Unified · Split

2 files
  1. src/include/disvm.h +9 −7
  2. src/include/runtime.h +1 −1
src/include/disvm.h+9−7
@@ -89,14 +89,16 @@ namespace disvm · 88 unmodified lines
89 // All fields on the output structure will be set.89 // All fields on the output structure will be set.
90 vm_version_t get_version() const;90 vm_version_t get_version() const;
91 91
92 // Begin execution of the module at the supplied path92 // Begin execution of the module at the supplied path and return the ID of
93 const runtime::vm_thread_t& exec(const char *path);93 // the executing thread.
94 uint32_t exec(const char *path);
94 95
95 // Begin execution of the supplied module96 // Begin execution of the supplied module and return the ID of the executing thread.
96 const runtime::vm_thread_t& exec(std::unique_ptr<runtime::vm_module_t> entry_module);97 uint32_t exec(std::unique_ptr<runtime::vm_module_t> entry_module);
97 98
98 // Begin execution of a child thread in the supplied module at the indicated program counter99 // Begin execution of a child thread in the supplied module at the indicated
99 const runtime::vm_thread_t& fork(100 // program counter and return the ID of the executing thread.
101 uint32_t fork(
100 const uint32_t parent_tid,102 const uint32_t parent_tid,
101 runtime::vm_module_ref_t &module_ref,103 runtime::vm_module_ref_t &module_ref,
102 const runtime::vm_frame_t &initial_frame,104 const runtime::vm_frame_t &initial_frame,
@@ -128,7 +130,7 @@ namespace disvm · 25 unmodified lines
128 void unload_tool(std::size_t tool_id);130 void unload_tool(std::size_t tool_id);
129 131
130 private:132 private:
131 const runtime::vm_thread_t &schedule_thread(std::unique_ptr<runtime::vm_thread_t> thread);133 void schedule_thread(std::unique_ptr<runtime::vm_thread_t> thread);
132 134
133 using loaded_modules_t = std::forward_list<loaded_vm_module_t>;135 using loaded_modules_t = std::forward_list<loaded_vm_module_t>;
134 mutable std::mutex _modules_lock;136 mutable std::mutex _modules_lock;
src/include/runtime.h+1−1
@@ -865,7 +865,7 @@ namespace disvm · 864 unmodified lines
865 virtual vm_scheduler_control_t &get_controller() const = 0;865 virtual vm_scheduler_control_t &get_controller() const = 0;
866 866
867 // Schedule the supplied thread for execution867 // Schedule the supplied thread for execution
868 virtual const vm_thread_t& schedule_thread(std::unique_ptr<vm_thread_t> thread) = 0;868 virtual void schedule_thread(std::unique_ptr<vm_thread_t> thread) = 0;
869 869
870 // Set tool dispatch on all threads.870 // Set tool dispatch on all threads.
871 // This is a blocking function and will not return until all current threads have been updated.871 // This is a blocking function and will not return until all current threads have been updated.