search for: fiber_join

Displaying 3 results from an estimated 3 matches for "fiber_join".

2016 Jun 13
3
[RFC] LLVM Coroutines
...ns 0 - in a fiber returns 1 - in a thread uses %mem to store fiber context + fiber stack i1 fiber_suspend() - suspends current fiber, switches back to thread stores the fiber context to be able to resume later void fiber_join(i8* %mem i1 %val) - switches to fiber stack identified by %mem, fiber_suspend will return %val when resumed void fiber_end() noreturn - switches back to a thread, does not remember fiber context and does not touch %mem....
2016 Jun 15
2
[RFC] LLVM Coroutines
...d() - suspends current fiber, switches back to thread >> stores the fiber context to be able to resume later > > This looks like a normal function call, except that the "return" may > be arbitrarily spaced out from the call? > >> void fiber_join(i8* %mem i1 %val) - switches to fiber stack identified by %mem, >> fiber_suspend will return %val when resumed >> >> void fiber_end() noreturn >> - switches back to a thread, does not remember fiber >>...
2016 Jun 12
2
[RFC] LLVM Coroutines
I think I got it. Original model (with coro.fork and two-way coro.suspend) will work with a tiny tweak. In the original model, I was replacing coro.suspend with br %return in original function. The problem was coming from potential phi-nodes introduces into return block during optimizations. Let's make sure that there is only entry into the return block. In the original model, ReturnBB had