0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-30 17:34:04 +01:00

rocksdb::port: Simplify assertion.

ircd::ctx::posix: Fix erroneous comment.

ircd::ctx::posix: Relax assertion.
This commit is contained in:
Jason Volk 2020-05-04 18:37:42 -07:00
parent 0a1eb9fa82
commit 85fb1804be
2 changed files with 2 additions and 6 deletions

View file

@ -89,7 +89,6 @@ __real_pthread_self(void);
extern "C" pthread_t
__wrap_pthread_self(void)
{
// Note that on the "main" ctx (id=1) we report the real pthread ID
return ircd::ctx::current?
ircd_pthread_self():
__real_pthread_self();
@ -198,7 +197,7 @@ pthread_t
ircd_pthread_self(void)
noexcept
{
always_assert(ircd::ctx::current);
assert(ircd::ctx::current);
return id(ircd::ctx::cur());
}

View file

@ -98,10 +98,7 @@ void
rocksdb::port::Mutex::AssertHeld()
noexcept
{
if(unlikely(!ctx::current))
return;
assert(mu.locked());
assert(!ctx::current || mu.locked());
}
//