0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 02:02:38 +01:00

ircd::ctx: Remove branch never taken.

This commit is contained in:
Jason Volk 2019-10-10 19:55:15 -07:00
parent d44da6c8fd
commit b415ec3125

View file

@ -207,16 +207,10 @@ ircd::ctx::ctx::wait()
assert(this->yc);
assert(current == this);
assert(notes == 1);
if(--notes > 0)
return false;
// An interrupt invokes this closure to force the alarm to return.
const interruptor &interruptor{[this]
(ctx *const &interruptor) noexcept
{
wake();
}};
// Clear the notification counter.
notes = 0;
// This is currently a dummy predicate; this is where we can take the
// user's real wakeup condition (i.e from a ctx::dock) and use it with
@ -226,6 +220,13 @@ ircd::ctx::ctx::wait()
return notes > 0;
}};
// An interrupt invokes this closure to force the alarm to return.
const interruptor &interruptor{[this]
(ctx *const &interruptor) noexcept
{
wake();
}};
// The construction of the arguments to the call on this stack comprise
// our final control before the context switch. The destruction of the
// arguments comprise the initial control after the context switch.