MCPcopy Create free account
hub / github.com/FastLED/FastLED / entry_trampoline

Method entry_trampoline

src/platforms/shared/coroutine_context.cpp.hpp:63–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61//=============================================================================
62
63void CoroutineContext::entry_trampoline() FL_NOEXCEPT {
64 CoroutineContext* self = globals().current;
65 if (self && self->mFunction) {
66 self->mFunction();
67 }
68
69 // Mark completed and switch back to runner
70 if (self) {
71 self->mCompleted = true;
72 }
73
74 void* runner = get_runner_ctx();
75 if (runner && self) {
76 ICoroutinePlatform::instance().contextSwitch(
77 self->mPlatformCtx, runner);
78 }
79
80 // Should never reach here
81 while (true) {}
82}
83
84CoroutineContext* CoroutineContext::create(fl::function<void()> func,
85 size_t stack_size) FL_NOEXCEPT {

Callers

nothing calls this directly

Calls 2

get_runner_ctxFunction · 0.85
contextSwitchMethod · 0.80

Tested by

no test coverage detected