![]() |
Spicy
|
#include <context.h>
Public Member Functions | |
| Context (vthread::ID vid) | |
| Context (const Context &)=delete | |
| Context (Context &&)=delete | |
| Context & | operator= (const Context &)=delete |
| Context & | operator= (Context &&)=delete |
Public Attributes | |
| vthread::ID | vid |
| resumable::Handle * | resumable = nullptr |
| detail::FiberContext | fiber |
| std::vector< std::shared_ptr< void > > | hilti_globals |
| void * | cookie = nullptr |
| uint64_t | debug_indent {} |
| const char * | location = nullptr |
Thread execution context. One of these exists per virtual thread, plus one for the main thread.
The type's fields are considered implementation details and shouldn't be accessed or modified by external code.
|
explicit |
| vid | virtual thread ID of the thread that will use the context |
| void* hilti::rt::Context::cookie = nullptr |
A user-defined cookie value that's carried around with the context.
| uint64_t hilti::rt::Context::debug_indent {} |
Current indent level for debug messages.
| detail::FiberContext hilti::rt::Context::fiber |
Context-specific state for fiber management.
| std::vector<std::shared_ptr<void> > hilti::rt::Context::hilti_globals |
Pointer to an array of (per thread) global variables allocated by the linker code. Each array entry corresponds to the globals of one HILTI module.
| const char* hilti::rt::Context::location = nullptr |
Current location for user-visible diagnostic messages if we're running outside of a fiber; null if not set. Considered valid only if resumable is not set.
| resumable::Handle* hilti::rt::Context::resumable = nullptr |
Current resumable if we're inside a fiber so that yielding is supported. Ownership remains with original caller.
| vthread::ID hilti::rt::Context::vid |
The ID of the virtual thread this context belongs to. vthread::Main for the main thread.