| 218 | } |
| 219 | |
| 220 | void* CoroutinePlatformTeensy::createRunnerContext() FL_NOEXCEPT { |
| 221 | auto* state = new TeensyContextState(); // ok bare allocation |
| 222 | // Runner uses main thread's MSP — saved_sp filled on first contextSwitch |
| 223 | state->saved_sp = nullptr; |
| 224 | state->stack_base = nullptr; |
| 225 | state->stack_size = 0; |
| 226 | return state; |
| 227 | } |
| 228 | |
| 229 | void CoroutinePlatformTeensy::destroyContext(void* ctx) FL_NOEXCEPT { |
| 230 | if (!ctx) return; |