28#ifndef __BASE_FIBER_HH__
29#define __BASE_FIBER_HH__
34#if defined(__APPLE__) && defined(__MACH__)
35#define _XOPEN_SOURCE 600
43#pragma push_macro("__USE_FORTIFY_LEVEL")
44#undef __USE_FORTIFY_LEVEL
46#pragma pop_macro("__USE_FORTIFY_LEVEL")
51#include "config/have_valgrind.hh"
161 unsigned valgrindStackId;
This class represents a fiber, which is a light weight sort of thread which is cooperatively schedule...
virtual void main()=0
This method is called when this fiber is first run.
static void entryTrampoline()
static Fiber * currentFiber()
Get a pointer to the current running Fiber.
static Fiber * primaryFiber()
Get a pointer to the primary Fiber.
bool started() const
Returns whether the "main" function of this fiber has started.
bool finished() const
Returns whether the "main" function of this fiber has finished.
Fiber(size_t stack_size=DefaultStackSize)
void run()
Start executing the fiber represented by this object.
static const size_t DefaultStackSize
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.