mirror of
https://github.com/matrix-construct/construct
synced 2024-08-22 09:34:45 +02:00
ircd::db: Disable interruption for port operations.
This commit is contained in:
parent
67ce539759
commit
d754af2f18
12
ircd/db.cc
12
ircd/db.cc
|
@ -7480,6 +7480,8 @@ rocksdb::port::Mutex::Lock()
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
assert_main_thread();
|
||||||
|
const ctx::uninterruptible::nothrow ui;
|
||||||
mu.lock();
|
mu.lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7496,7 +7498,9 @@ rocksdb::port::Mutex::Unlock()
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
assert_main_thread();
|
||||||
assert(mu.locked());
|
assert(mu.locked());
|
||||||
|
const ctx::uninterruptible::nothrow ui;
|
||||||
mu.unlock();
|
mu.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7560,6 +7564,7 @@ rocksdb::port::RWMutex::ReadLock()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert_main_thread();
|
assert_main_thread();
|
||||||
|
const ctx::uninterruptible::nothrow ui;
|
||||||
mu.lock_shared();
|
mu.lock_shared();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7577,6 +7582,7 @@ rocksdb::port::RWMutex::WriteLock()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert_main_thread();
|
assert_main_thread();
|
||||||
|
const ctx::uninterruptible::nothrow ui;
|
||||||
mu.lock();
|
mu.lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7594,6 +7600,7 @@ rocksdb::port::RWMutex::ReadUnlock()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert_main_thread();
|
assert_main_thread();
|
||||||
|
const ctx::uninterruptible::nothrow ui;
|
||||||
mu.unlock_shared();
|
mu.unlock_shared();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7611,6 +7618,7 @@ rocksdb::port::RWMutex::WriteUnlock()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert_main_thread();
|
assert_main_thread();
|
||||||
|
const ctx::uninterruptible::nothrow ui;
|
||||||
mu.unlock();
|
mu.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7668,6 +7676,7 @@ rocksdb::port::CondVar::Wait()
|
||||||
assert(mu);
|
assert(mu);
|
||||||
assert_main_thread();
|
assert_main_thread();
|
||||||
mu->AssertHeld();
|
mu->AssertHeld();
|
||||||
|
const ctx::uninterruptible::nothrow ui;
|
||||||
cv.wait(mu->mu);
|
cv.wait(mu->mu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7689,6 +7698,7 @@ rocksdb::port::CondVar::TimedWait(uint64_t abs_time_us)
|
||||||
mu->AssertHeld();
|
mu->AssertHeld();
|
||||||
const std::chrono::microseconds us(abs_time_us);
|
const std::chrono::microseconds us(abs_time_us);
|
||||||
const std::chrono::steady_clock::time_point tp(us);
|
const std::chrono::steady_clock::time_point tp(us);
|
||||||
|
const ctx::uninterruptible::nothrow ui;
|
||||||
return cv.wait_until(mu->mu, tp) == std::cv_status::timeout;
|
return cv.wait_until(mu->mu, tp) == std::cv_status::timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7706,6 +7716,7 @@ rocksdb::port::CondVar::Signal()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert_main_thread();
|
assert_main_thread();
|
||||||
|
const ctx::uninterruptible::nothrow ui;
|
||||||
cv.notify_one();
|
cv.notify_one();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7723,6 +7734,7 @@ rocksdb::port::CondVar::SignalAll()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert_main_thread();
|
assert_main_thread();
|
||||||
|
const ctx::uninterruptible::nothrow ui;
|
||||||
cv.notify_all();
|
cv.notify_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue