mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd::ctx: Remove branch never taken.
This commit is contained in:
parent
d44da6c8fd
commit
b415ec3125
1 changed files with 10 additions and 9 deletions
19
ircd/ctx.cc
19
ircd/ctx.cc
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue