0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-28 23:08:20 +02:00

ircd::ctx: Use thread_local keyword for current.

This commit is contained in:
Jason Volk 2020-02-11 12:17:59 -08:00
parent 1ebe09f36b
commit 0fd8019149
2 changed files with 3 additions and 2 deletions

View file

@ -44,7 +44,7 @@ inline namespace this_ctx
namespace ircd::ctx
{
/// Points to the currently running context or null for main stack (do not modify)
extern __thread ctx *current;
extern thread_local ctx *current;
}
namespace ircd

View file

@ -687,7 +687,8 @@ noexcept
//
// set by the continuation object and the base frame.
__thread ircd::ctx::ctx *
thread_local
ircd::ctx::ctx *
ircd::ctx::current;
/// Yield the currently running context until `time_point` ignoring notes