… | … | ||
---|---|---|---|
228 | # endif | 228 | # endif |
229 | 229 | ||
230 | # include <setjmp.h> | 230 | # include <setjmp.h> |
231 | 231 | ||
232 | struct coro_context { | 232 | struct coro_context { |
233 | #if _XOPEN_UNIX > 0 || CORO_LOSER | ||
233 | jmp_buf env; | 234 | jmp_buf env; |
235 | #else | ||
236 | sigjmp_buf env; | ||
237 | #endif | ||
234 | }; | 238 | }; |
235 | 239 | ||
236 | # if _XOPEN_UNIX > 0 | 240 | # if _XOPEN_UNIX > 0 |
237 | # define coro_transfer(p,n) do { if (! _setjmp ((p)->env )) _longjmp ((n)->env, 1); } while (0) | 241 | # define coro_transfer(p,n) do { if (! _setjmp ((p)->env )) _longjmp ((n)->env, 1); } while (0) |
238 | # elif CORO_LOSER | 242 | # elif CORO_LOSER |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |