3 ms·
I didn't see any assembler code in libmill, nor does it use ucontext. Not sure what you are talking about here?
by BlackFingolfin 11y ago
I didn't see any assembler code in libmill, nor does it use ucontext. Not sure what you are talking about here?
- jkarneges 11y agoAh, I forgot libmill uses setjmp/longjmp. I'm not sure how that really works for coroutines though since you still need to deal with stack allocations. So replace "non-portable assembly" with "possibly non-portable C hacks". I haven't gotten around to digging deep in the code yet though. If libmill's approach is future-proof then that'd be pretty awesome.
- rumcajz 11y agoIt's a hack, but one that's relatively benign: allocate stack using malloc, move sp using variable-sized array.