hnes / libaco

A blazing fast and lightweight C asymmetric coroutine library 💎 ⛅🚀⛅🌞
https://libaco.org
Apache License 2.0
3.49k stars 392 forks source link

为什么使用自行编写的acosw.S汇编来切换上下文,而不是使用现成的setjmp? #34

Closed liuziangexit closed 4 years ago

liuziangexit commented 4 years ago

亲爱的作者,您好:) 希望借issue区向您请教一个简单的问题。

为什么您选择自己编写汇编来切换上下文,而不是使用现成的setjmp?是因为setjmp功能不足,还是因为其性能不如手写汇编?

期待您的回复!

liuziangexit commented 4 years ago

https://en.m.wikipedia.org/wiki/Setcontext 这里已经说明白了,打扰了。