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

Comparing libcoro/coro.h (file contents):
Revision 1.20 by root, Fri Apr 27 19:26:18 2007 UTC vs.
Revision 1.21 by root, Fri Apr 27 19:35:28 2007 UTC

38/* 38/*
39 * 2006-10-26 Include stddef.h on OS X to work around one of its bugs. 39 * 2006-10-26 Include stddef.h on OS X to work around one of its bugs.
40 * Reported by Michael_G_Schwern. 40 * Reported by Michael_G_Schwern.
41 * 2006-11-26 Use _setjmp instead of setjmp on GNU/Linux. 41 * 2006-11-26 Use _setjmp instead of setjmp on GNU/Linux.
42 * 2007-04-27 Set unwind frame info if gcc 3+ and ELF is detected. 42 * 2007-04-27 Set unwind frame info if gcc 3+ and ELF is detected.
43 * Use _setjmp instead of setjmp on _XOPEN_SOURCE >= 600.
43 */ 44 */
44 45
45#ifndef CORO_H 46#ifndef CORO_H
46#define CORO_H 47#define CORO_H
47 48
172 173
173struct coro_context { 174struct coro_context {
174 jmp_buf env; 175 jmp_buf env;
175}; 176};
176 177
177#if CORO_LINUX 178#if CORO_LINUX || (_XOPEN_SOURCE >= 600)
178# define coro_transfer(p,n) do { if (!_setjmp ((p)->env)) _longjmp ((n)->env, 1); } while (0) 179# define coro_transfer(p,n) do { if (!_setjmp ((p)->env)) _longjmp ((n)->env, 1); } while (0)
179#else 180#else
180# define coro_transfer(p,n) do { if (!setjmp ((p)->env)) longjmp ((n)->env, 1); } while (0) 181# define coro_transfer(p,n) do { if (!setjmp ((p)->env)) longjmp ((n)->env, 1); } while (0)
181#endif 182#endif
182 183

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines