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

Method entry

sources/system/unix/common.cpp:329–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327 cs_fiber_ucontext_t *prev_ctx = nullptr;
328
329 static void entry() noexcept
330 {
331 unix_fiber *fi = static_cast<unix_fiber *>(current_process->fiber_stack.top().get());
332 try {
333 fi->state = fiber_state::running;
334 var ret = fi->func();
335 fi->ret_val.swap(ret);
336 }
337 catch (...) {
338 fi->eptr = std::current_exception();
339 }
340 fi->state = fiber_state::finished;
341 cs_fiber_swapcontext(&fi->ctx, fi->prev_ctx);
342 // This should never execute
343 std::abort();
344 }
345
346 public:
347 unix_fiber() = delete;

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
swapMethod · 0.45

Tested by

no test coverage detected