cloudwu / coroutine

A asymmetric coroutine library for C.
MIT License
2.44k stars 686 forks source link

run on macosx #2

Closed kevin1sMe closed 10 years ago

kevin1sMe commented 10 years ago

Hi cloud, I have a problem when compile with gcc and run on macosx10.8 using the example main.c. Because of ucontext.h, I try to change the include(using sys/ucontext.h instand of ucontext.h):

ifdef _ONMAC

include <sys/ucontext.h>

else

include

endif

then complie succ, but execute with some exception. co[1]->status had changed when coroutine_resume() it. so coroutine_resume():default assert(0) running...

I try to gdb and watch the variable of co[1]->status, but nothing to find... so ... I'm deep appreciate of yours help, or any suggest.

cloudwu commented 10 years ago

Sorry, I have no idea about this. swapcontext is deprecated on macosx.

kevin1sMe commented 10 years ago

3Q