Unified · Split
| @@ -86,6 +86,7 @@ global_alloc_lock_t disvm::runtime::get_global_alloc_lock() · 85 unmodified lines | |||
| 86 | // Block while trying to get lock | 86 | // 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 | } |