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
8989 // All fields on the output structure will be set.
9090 vm_version_t get_version() const;
9191
92− // Begin execution of the module at the supplied path
93− const runtime::vm_thread_t& exec(const char *path);
92+ // Begin execution of the module at the supplied path and return the ID of
93+ // the executing thread.
94+ uint32_t exec(const char *path);
9495
95− // Begin execution of the supplied module
96− const runtime::vm_thread_t& exec(std::unique_ptr<runtime::vm_module_t> entry_module);
96+ // Begin execution of the supplied module and return the ID of the executing thread.
97+ uint32_t exec(std::unique_ptr<runtime::vm_module_t> entry_module);
9798
98− // Begin execution of a child thread in the supplied module at the indicated program counter
99− const runtime::vm_thread_t& fork(
99+ // Begin execution of a child thread in the supplied module at the indicated
100+ // program counter and return the ID of the executing thread.
101+ uint32_t fork(
100102 const uint32_t parent_tid,
101103 runtime::vm_module_ref_t &module_ref,
102104 const runtime::vm_frame_t &initial_frame,
@@ -128,7 +130,7 @@ namespace disvm · 25 unmodified lines
128130 void unload_tool(std::size_t tool_id);
129131
130132 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);
132134
133135 using loaded_modules_t = std::forward_list<loaded_vm_module_t>;
134136 mutable std::mutex _modules_lock;
src/include/runtime.h+1−1
@@ -865,7 +865,7 @@ namespace disvm · 864 unmodified lines
865865 virtual vm_scheduler_control_t &get_controller() const = 0;
866866
867867 // 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;
869869
870870 // Set tool dispatch on all threads.
871871 // This is a blocking function and will not return until all current threads have been updated.