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

Comparing libcoro/coro.h (file contents):
Revision 1.16 by root, Sat Nov 25 00:27:00 2006 UTC vs.
Revision 1.17 by root, Sun Nov 26 03:18:51 2006 UTC

36 */ 36 */
37 37
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-25 Use _setjmp instead of setjmp on GNU/Linux. 41 * 2006-11-26 Use _setjmp instead of setjmp on GNU/Linux.
42 */ 42 */
43 43
44#ifndef CORO_H 44#ifndef CORO_H
45#define CORO_H 45#define CORO_H
46 46
169 169
170struct coro_context { 170struct coro_context {
171 jmp_buf env; 171 jmp_buf env;
172}; 172};
173 173
174#if CORO_LINUX
175# define coro_transfer(p,n) do { if (!_setjmp ((p)->env)) _longjmp ((n)->env, 1); } while(0)
176#else
174#define coro_transfer(p,n) do { if (!setjmp ((p)->env)) longjmp ((n)->env, 1); } while(0) 177# define coro_transfer(p,n) do { if (!setjmp ((p)->env)) longjmp ((n)->env, 1); } while(0)
178#endif
175 179
176#endif 180#endif
177 181
178#endif 182#endif
179 183

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines