--- libcoro/coro.h 2008/11/08 04:31:28 1.33 +++ libcoro/coro.h 2008/11/08 04:52:01 1.34 @@ -234,9 +234,11 @@ }; # if _XOPEN_UNIX > 0 -# define coro_transfer(p,n) do { if (!_setjmp ((p)->env)) _longjmp ((n)->env, 1); } while (0) +# define coro_transfer(p,n) do { if (! _setjmp ((p)->env )) _longjmp ((n)->env, 1); } while (0) +# elif CORO_LOSER +# define coro_transfer(p,n) do { if (! setjmp ((p)->env )) longjmp ((n)->env, 1); } while (0) # else -# define coro_transfer(p,n) do { if (! setjmp ((p)->env)) longjmp ((n)->env, 1); } while (0) +# define coro_transfer(p,n) do { if (!sigsetjmp ((p)->env, 0)) siglongjmp ((n)->env, 1); } while (0) # endif # define coro_destroy(ctx) (void *)(ctx) @@ -244,7 +246,7 @@ #elif CORO_ASM struct coro_context { - volatile void **sp; /* must be at offset 0 */ + void **sp; /* must be at offset 0 */ }; void __attribute__ ((__noinline__, __regparm__(2)))