MCPcopy Create free account
hub / github.com/covscript/covscript / entry

Method entry

sources/system/win32/common.cpp:189–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187 LPVOID prev_ctx = nullptr;
188
189 static void __stdcall entry(LPVOID lpParameter) noexcept
190 {
191 win32_fiber *fi = static_cast<win32_fiber *>(lpParameter);
192 try {
193 fi->state = fiber_state::running;
194 var ret = fi->func();
195 fi->ret_val.swap(ret);
196 }
197 catch (...) {
198 fi->eptr = std::current_exception();
199 }
200 fi->state = fiber_state::finished;
201 SwitchToFiber(fi->prev_ctx);
202 // This should never execute
203 std::abort();
204 }
205
206 public:
207 win32_fiber() = delete;

Callers

nothing calls this directly

Calls 1

swapMethod · 0.45

Tested by

no test coverage detected