Lines Matching defs:Fiber
63 class PrimaryFiber : public Fiber
66 PrimaryFiber() : Fiber(nullptr, 0) { setStarted(); }
72 // A pointer to whatever the currently executing Fiber is.
73 Fiber *_currentFiber = &_primaryFiber;
75 // A pointer to the Fiber which is currently being started/initialized.
76 Fiber *startingFiber = nullptr;
81 Fiber::entryTrampoline()
86 Fiber::Fiber(size_t stack_size) : Fiber(primaryFiber(), stack_size)
89 Fiber::Fiber(Fiber *link, size_t stack_size) :
113 Fiber::~Fiber()
115 panic_if(stack && _currentFiber == this, "Fiber stack is in use.");
124 Fiber::createContext()
136 panic_if(!_currentFiber, "No active Fiber object.");
143 Fiber::start()
158 // main has returned, so this Fiber has finished. Switch to the "link"
159 // Fiber.
165 Fiber::run()
167 panic_if(_finished, "Fiber has already run to completion.");
176 // Switch out of the current Fiber's context and this one's in.
177 Fiber *prev = _currentFiber;
178 Fiber *next = this;
183 Fiber *Fiber::currentFiber() { return _currentFiber; }
184 Fiber *Fiber::primaryFiber() { return &_primaryFiber; }