ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libcoro/coro.h
(Generate patch)

Comparing libcoro/coro.h (file contents):
Revision 1.33 by root, Sat Nov 8 04:31:28 2008 UTC vs.
Revision 1.34 by root, Sat Nov 8 04:52:01 2008 UTC

232struct coro_context { 232struct coro_context {
233 jmp_buf env; 233 jmp_buf env;
234}; 234};
235 235
236# if _XOPEN_UNIX > 0 236# if _XOPEN_UNIX > 0
237# define coro_transfer(p,n) do { if (!_setjmp ((p)->env)) _longjmp ((n)->env, 1); } while (0) 237# define coro_transfer(p,n) do { if (! _setjmp ((p)->env )) _longjmp ((n)->env, 1); } while (0)
238# elif CORO_LOSER
239# define coro_transfer(p,n) do { if (! setjmp ((p)->env )) longjmp ((n)->env, 1); } while (0)
238# else 240# else
239# define coro_transfer(p,n) do { if (! setjmp ((p)->env)) longjmp ((n)->env, 1); } while (0) 241# define coro_transfer(p,n) do { if (!sigsetjmp ((p)->env, 0)) siglongjmp ((n)->env, 1); } while (0)
240# endif 242# endif
241 243
242# define coro_destroy(ctx) (void *)(ctx) 244# define coro_destroy(ctx) (void *)(ctx)
243 245
244#elif CORO_ASM 246#elif CORO_ASM
245 247
246struct coro_context { 248struct coro_context {
247 volatile void **sp; /* must be at offset 0 */ 249 void **sp; /* must be at offset 0 */
248}; 250};
249 251
250void __attribute__ ((__noinline__, __regparm__(2))) 252void __attribute__ ((__noinline__, __regparm__(2)))
251coro_transfer (coro_context *prev, coro_context *next); 253coro_transfer (coro_context *prev, coro_context *next);
252 254

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines