News for hackers. Stuff that matters.
Re:Libaco: A fast and lightweight C asymmetric coroutine lib... by stevefan1999 on Saturday July 14, 2018 @04:42AM (#17529440)
I suggest using setjmp/longjmp instead of copying registers manually.
Re:Libaco: A fast and lightweight C asymmetric coroutine lib... by ufo on Saturday July 14, 2018 @10:50AM (#17530544)
How would you do that? longjmp let's you jump back to the parent coroutine but after that you cannot jump back to the child to continue where it left off.
Re:Libaco: A fast and lightweight C asymmetric coroutine lib... by cryptonector on Saturday July 14, 2018 @02:43PM (#17531687)
By using different stacks for each coroutine. But it's still not trivial.