History

Fix bug in global alloc lock function.

arr committed 9 years ago

Commit 87f2d5b1 parent ad4a6c31 file · +1 −0Browse files

Showing the changes to src/vm/vm_memory.cpp (1 of 1 file). Show all

Unified · Split

src/vm/vm_memory.cpp+1−0
@@ -86,6 +86,7 @@ global_alloc_lock_t disvm::runtime::get_global_alloc_lock() · 85 unmodified lines
86 // Block while trying to get lock86 // Block while trying to get lock
87 while (!lock_state.compare_exchange_strong(expected, lock_state_t::pending))87 while (!lock_state.compare_exchange_strong(expected, lock_state_t::pending))
88 {88 {
89 expected = lock_state_t::none;
89 std::unique_lock<std::mutex> lock{ global_lock };90 std::unique_lock<std::mutex> lock{ global_lock };
90 release_lock.wait(lock);91 release_lock.wait(lock);
91 }92 }