halayli / lthread

lthread, a multicore enabled coroutine library written in C
Other
814 stars 82 forks source link

ucontext compat layer? #15

Closed nwmcsween closed 12 years ago

nwmcsween commented 12 years ago

Hi would lthread be able to provide a ucontext compat layer? This is needed for libcs that don't provide ucontext

halayli commented 12 years ago

Yes, lthread can provide a ucontext compat layer. Just take the _switch() function and wrap the ucontext calls around it.

jannson commented 8 years ago

Thanks, I will have a try for ucontext

jannson commented 8 years ago

I have to rewrite _lthread_init / _switch is it right ?

jannson commented 8 years ago

Thanks for your great works. After try for hours, it finally works for arm. This is my fork: https://github.com/jannson/lthread/commit/48ca55d19850c763e92659ffd271dae0ce0d5efc

Please have a check, if there are some errors I can't found. I will make the code better and give you a pull request, if you want to support for arm.