mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
ircd::ctx: Adjust prof defaults; minor cleanup.
This commit is contained in:
parent
7599c4bb6e
commit
c16a6e8baa
2 changed files with 17 additions and 16 deletions
|
@ -59,16 +59,7 @@ namespace ircd::ctx
|
|||
///
|
||||
struct ircd::ctx::context
|
||||
{
|
||||
enum flags
|
||||
:uint
|
||||
{
|
||||
POST = 0x01, ///< Defers spawn with an ios.post()
|
||||
DISPATCH = 0x02, ///< Defers spawn with an ios.dispatch() (possibly)
|
||||
DETACH = 0x04, ///< Context deletes itself; see struct context constructor notes
|
||||
|
||||
INTERRUPTED = 0x10, ///< (INDICATOR) Marked
|
||||
};
|
||||
|
||||
enum flags :uint;
|
||||
using function = std::function<void ()>;
|
||||
|
||||
private:
|
||||
|
@ -118,6 +109,16 @@ struct ircd::ctx::context
|
|||
friend void swap(context &a, context &b) noexcept;
|
||||
};
|
||||
|
||||
enum ircd::ctx::context::flags
|
||||
:uint
|
||||
{
|
||||
POST = 0x01, ///< Defers spawn with an ios.post()
|
||||
DISPATCH = 0x02, ///< Defers spawn with an ios.dispatch() (possibly)
|
||||
DETACH = 0x04, ///< Context deletes itself; see struct context constructor notes
|
||||
|
||||
INTERRUPTED = 0x10, ///< (INDICATOR) Marked
|
||||
};
|
||||
|
||||
inline void
|
||||
ircd::ctx::swap(context &a, context &b)
|
||||
noexcept
|
||||
|
|
12
ircd/ctx.cc
12
ircd/ctx.cc
|
@ -518,7 +518,7 @@ namespace ircd::ctx
|
|||
|
||||
void
|
||||
ircd::ctx::spawn(ctx *const c,
|
||||
context::function func)
|
||||
context::function func)
|
||||
{
|
||||
const boost::coroutines::attributes attrs
|
||||
{
|
||||
|
@ -811,12 +811,12 @@ namespace ircd::ctx::prof
|
|||
|
||||
struct ircd::ctx::prof::settings ircd::ctx::prof::settings
|
||||
{
|
||||
0.46, // stack_usage_warning
|
||||
0.67, // stack_usage_assertion
|
||||
0.33, // stack_usage_warning at 1/3 engineering tolerance
|
||||
0.50, // stack_usage_assertion at 1/2 engineering tolerance
|
||||
|
||||
50ms, // slice_warning
|
||||
0us, // slice_interrupt
|
||||
0us, // slice_assertion
|
||||
50ms, // slice_warning at 1/20 slices per second
|
||||
0us, // slice_interrupt unused until project more mature...
|
||||
0us, // slice_assertion unused; warning sufficient for now...
|
||||
};
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue