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

ircd::ctx: Add some noexcept; minor comment justification.

This commit is contained in:
Jason Volk 2020-05-18 19:13:53 -07:00
parent 00fe4baa2a
commit 3c96120e72
2 changed files with 30 additions and 27 deletions

View file

@ -63,9 +63,9 @@ namespace ircd::ctx
bool queued(const ctx &) noexcept; // !running() && notes() > 0
uint32_t &flags(ctx &) noexcept; // Direct flags access
int8_t ionice(ctx &, const int8_t &); // IO priority nice-value
int8_t nice(ctx &, const int8_t &); // Scheduling priority nice-value
void interruptible(ctx &, const bool &); // False for interrupt suppression.
int8_t ionice(ctx &, const int8_t &) noexcept; // IO priority nice-value
int8_t nice(ctx &, const int8_t &) noexcept; // Scheduling priority nice-value
void interruptible(ctx &, const bool &) noexcept; // False for interrupt suppression.
void interrupt(ctx &); // Interrupt the context.
void terminate(ctx &); // Interrupt for termination.
void signal(ctx &, std::function<void ()>); // Post function to context strand

View file

@ -514,6 +514,7 @@ ircd::ctx::interrupt(ctx &ctx)
void
ircd::ctx::interruptible(ctx &ctx,
const bool &b)
noexcept
{
if(b)
ctx.flags &= ~context::NOINTERRUPT;
@ -524,6 +525,7 @@ ircd::ctx::interruptible(ctx &ctx,
int8_t
ircd::ctx::nice(ctx &ctx,
const int8_t &val)
noexcept
{
ctx.nice = val;
return ctx.nice;
@ -532,6 +534,7 @@ ircd::ctx::nice(ctx &ctx,
int8_t
ircd::ctx::ionice(ctx &ctx,
const int8_t &val)
noexcept
{
ctx.ionice = val;
return ctx.ionice;