Improve cond_var notifiers

But nobody uses it anyway, so clean up includes.
This commit is contained in:
Nekotekina
2020-11-05 18:59:01 +03:00
parent 7d56069243
commit 34fa010601
20 changed files with 69 additions and 71 deletions
+1 -1
View File
@@ -1397,7 +1397,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) no
{
if (auto mem = vm::get(vm::any, addr))
{
std::shared_lock lock(pf_entries->mutex);
reader_lock lock(pf_entries->mutex);
for (const auto& entry : pf_entries->entries)
{
-1
View File
@@ -9,7 +9,6 @@
#include <string_view>
#include "mutex.h"
#include "cond.h"
#include "lockless.h"
// Report error and call std::abort(), defined in main.cpp
+2 -2
View File
@@ -50,10 +50,10 @@ void cond_variable::imp_wake(u32 _count) noexcept
if (_count > 1 || ((_old + (c_signal_mask & (0 - c_signal_mask))) & c_signal_mask) == c_signal_mask)
{
// Resort to notify_all if signal count reached max
m_value.notify_all();
m_value.notify_all(c_signal_mask);
}
else
{
m_value.notify_one();
m_value.notify_one(c_signal_mask);
}
}
-1
View File
@@ -2,7 +2,6 @@
#include "types.h"
#include "util/atomic.hpp"
#include <shared_mutex>
// Lightweight condition variable
class cond_variable
-1
View File
@@ -2,7 +2,6 @@
#include "types.h"
#include "mutex.h"
#include "cond.h"
#include "util/atomic.hpp"
#include "util/typeindices.hpp"
#include "VirtualMemory.h"