0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02:00

ircd::ctx::dock: Minor reorg.

This commit is contained in:
Jason Volk 2020-05-01 16:20:16 -07:00
parent 7df29b7ebe
commit f9015b8336

View file

@ -50,6 +50,42 @@ class ircd::ctx::dock
void notify() noexcept;
};
inline void
ircd::ctx::notify(dock &dock)
noexcept
{
dock.notify();
}
inline void
ircd::ctx::interrupt(dock &dock)
noexcept
{
dock.interrupt_all();
}
inline void
ircd::ctx::terminate(dock &dock)
noexcept
{
dock.terminate_all();
}
//
// dock::dock
//
/// Wake up the next context waiting on the dock
inline void
ircd::ctx::dock::notify_one()
noexcept
{
if(q.empty())
return;
ircd::ctx::notify(*q.front());
}
/// Returns true if notified; false if timed out
template<class duration>
bool
@ -165,35 +201,3 @@ ircd::ctx::dock::wait_until(time_point&& tp,
}
while(1);
}
/// Wake up the next context waiting on the dock
inline void
ircd::ctx::dock::notify_one()
noexcept
{
if(q.empty())
return;
ircd::ctx::notify(*q.front());
}
inline void
ircd::ctx::notify(dock &dock)
noexcept
{
dock.notify();
}
inline void
ircd::ctx::interrupt(dock &dock)
noexcept
{
dock.interrupt_all();
}
inline void
ircd::ctx::terminate(dock &dock)
noexcept
{
dock.terminate_all();
}