mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 15:30:52 +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
|
struct ircd::ctx::context
|
||||||
{
|
{
|
||||||
enum flags
|
enum flags :uint;
|
||||||
: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
|
|
||||||
};
|
|
||||||
|
|
||||||
using function = std::function<void ()>;
|
using function = std::function<void ()>;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -118,6 +109,16 @@ struct ircd::ctx::context
|
||||||
friend void swap(context &a, context &b) noexcept;
|
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
|
inline void
|
||||||
ircd::ctx::swap(context &a, context &b)
|
ircd::ctx::swap(context &a, context &b)
|
||||||
noexcept
|
noexcept
|
||||||
|
|
10
ircd/ctx.cc
10
ircd/ctx.cc
|
@ -811,12 +811,12 @@ namespace ircd::ctx::prof
|
||||||
|
|
||||||
struct ircd::ctx::prof::settings ircd::ctx::prof::settings
|
struct ircd::ctx::prof::settings ircd::ctx::prof::settings
|
||||||
{
|
{
|
||||||
0.46, // stack_usage_warning
|
0.33, // stack_usage_warning at 1/3 engineering tolerance
|
||||||
0.67, // stack_usage_assertion
|
0.50, // stack_usage_assertion at 1/2 engineering tolerance
|
||||||
|
|
||||||
50ms, // slice_warning
|
50ms, // slice_warning at 1/20 slices per second
|
||||||
0us, // slice_interrupt
|
0us, // slice_interrupt unused until project more mature...
|
||||||
0us, // slice_assertion
|
0us, // slice_assertion unused; warning sufficient for now...
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue