diff --git a/include/ircd/ios.h b/include/ircd/ios.h index de6842af8..acd15374b 100644 --- a/include/ircd/ios.h +++ b/include/ircd/ios.h @@ -148,6 +148,7 @@ struct ircd::ios::descriptor::stats struct ircd::ios::handler { static thread_local handler *current; + static thread_local uint64_t epoch; static void *allocate(handler *const &, const size_t &); static void deallocate(handler *const &, void *const &, const size_t &) noexcept; diff --git a/ircd/ios.cc b/ircd/ios.cc index 93882f36d..eeefb7c0d 100644 --- a/ircd/ios.cc +++ b/ircd/ios.cc @@ -153,9 +153,14 @@ ircd::ios::descriptor::stats::operator+=(const stats &o) // handler // -decltype(ircd::ios::handler::current) thread_local +decltype(ircd::ios::handler::current) +thread_local ircd::ios::handler::current; +decltype(ircd::ios::handler::epoch) +thread_local +ircd::ios::handler::epoch; + bool ircd::ios::handler::fault(handler *const &handler) noexcept @@ -208,7 +213,7 @@ noexcept assert(descriptor.stats); auto &stats(*descriptor.stats); ++stats.calls; - + ++handler::epoch; assert(!handler::current); handler::current = handler; handler->slice_start = cycles();