Showing the changes to src/vm/scheduler.cpp (1 of 6 files). Show all
Unified · Split
| @@ -254,7 +254,7 @@ void default_scheduler_t::enqueue_blocked_thread(uint32_t thread_id) · 253 unmodified lines | |||
| 254 | if (debug::is_component_tracing_enabled<debug::component_trace_t::scheduler>()) | 254 | if (debug::is_component_tracing_enabled<debug::component_trace_t::scheduler>()) |
| 255 | debug::log_msg(debug::component_trace_t::scheduler, debug::log_level_t::debug, "scheduler: enqueue blocked: %d", thread_id); | 255 | debug::log_msg(debug::component_trace_t::scheduler, debug::log_level_t::debug, "scheduler: enqueue blocked: %d", thread_id); |
| 256 | 256 | ||
| 257 | const bool runnable_thread = enqueue_thread_unsafe(std::move(thread_container), vm_thread_state_t::ready); | 257 | const bool runnable_thread = enqueue_thread_unsafe(thread_container.get(), vm_thread_state_t::ready); |
| 258 | if (runnable_thread) | 258 | if (runnable_thread) |
| 259 | { | 259 | { |
| 260 | lock_all.unlock(); | 260 | lock_all.unlock(); |
| @@ -294,7 +294,7 @@ std::shared_ptr<default_scheduler_t::thread_instance_t> default_scheduler_t::nex · 33 unmodified lines | |||
| 294 | 294 | ||
| 295 | std::unique_lock<std::mutex> lock_all{ _vm_threads_lock }; | 295 | std::unique_lock<std::mutex> lock_all{ _vm_threads_lock }; |
| 296 | --_running_vm_thread_count; | 296 | --_running_vm_thread_count; |
| 297 | const bool runnable_thread = enqueue_thread_unsafe(std::move(prev_thread), current_state); | 297 | const bool runnable_thread = enqueue_thread_unsafe(prev_thread.get(), current_state); |
| 298 | if (runnable_thread) | 298 | if (runnable_thread) |
| 299 | { | 299 | { |
| 300 | lock_all.unlock(); | 300 | lock_all.unlock(); |
| @@ -380,7 +380,7 @@ void default_scheduler_t::perform_gc(bool is_gc_thread, std::unique_lock<std::mu · 79 unmodified lines | |||
| 380 | } | 380 | } |
| 381 | } | 381 | } |
| 382 | 382 | ||
| 383 | bool default_scheduler_t::enqueue_thread_unsafe(std::shared_ptr<thread_instance_t> thread_instance, runtime::vm_thread_state_t current_state) | 383 | bool default_scheduler_t::enqueue_thread_unsafe(thread_instance_t *thread_instance, runtime::vm_thread_state_t current_state) |
| 384 | { | 384 | { |
| 385 | assert(thread_instance != nullptr); | 385 | assert(thread_instance != nullptr); |
| 386 | 386 | ||