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

Comparing libcoro/coro.h (file contents):
Revision 1.12 by root, Sat Aug 20 01:07:45 2005 UTC vs.
Revision 1.13 by root, Sun Feb 19 22:30:58 2006 UTC

55 * 55 *
56 * -DCORO_UCONTEXT 56 * -DCORO_UCONTEXT
57 * 57 *
58 * This flavour uses SUSv2's get/set/swap/makecontext functions that 58 * This flavour uses SUSv2's get/set/swap/makecontext functions that
59 * unfortunately only newer unices support. 59 * unfortunately only newer unices support.
60 * Use this for GNU/Linux + glibc-2.2.3. 60 * Use this for GNU/Linux + glibc-2.2.3 and possibly higher.
61 * 61 *
62 * -DCORO_SJLJ 62 * -DCORO_SJLJ
63 * 63 *
64 * This flavour uses SUSv'2 setjmp/longjmp and sigaltstack functions to 64 * This flavour uses SUSv2's setjmp/longjmp and sigaltstack functions to
65 * do it's job. Coroutine creation is much slower than UCONTEXT, but 65 * do it's job. Coroutine creation is much slower than UCONTEXT, but
66 * context switching is often a bit cheaper. It should work on almost 66 * context switching is often a bit cheaper. It should work on almost
67 * all unices. Use this for GNU/Linux + glibc-2.2. glibc-2.1 and below 67 * all unices. Use this for GNU/Linux + glibc-2.2. glibc-2.1 and below
68 * do not work with any sane model (neither sigaltstack nor context 68 * do not work with any sane model (neither sigaltstack nor context
69 * functions are implemented) 69 * functions are implemented)
70 * 70 *
71 * -DCORO_LINUX 71 * -DCORO_LINUX
72 * 72 *
73 * Old GNU/Linux systems (<= glibc-2.1) work with this implementation 73 * Old GNU/Linux systems (<= glibc-2.1) work with this implementation
74 * (very fast). 74 * (it is very fast and therefore recommended over other methods).
75 * 75 *
76 * -DCORO_LOSER 76 * -DCORO_LOSER
77 * 77 *
78 * Microsoft's highly proprietary platform doesn't support sigaltstack, and 78 * Microsoft's highly proprietary platform doesn't support sigaltstack, and
79 * this automatically selects a suitable workaround for this platform. 79 * this automatically selects a suitable workaround for this platform.
101 */ 101 */
102typedef struct coro_context coro_context; 102typedef struct coro_context coro_context;
103 103
104/* 104/*
105 * This function creates a new coroutine. Apart from a pointer to an 105 * This function creates a new coroutine. Apart from a pointer to an
106 * uninitialized coro_context, it expects a pointer to the entry function 106 * uninitialised coro_context, it expects a pointer to the entry function
107 * and the single pointer value that is given to it as argument. 107 * and the single pointer value that is given to it as argument.
108 * 108 *
109 * Allocating/deallocating the stack is your own responsibility, so there is 109 * Allocating/deallocating the stack is your own responsibility, so there is
110 * no coro_destroy function. 110 * no coro_destroy function.
111 */ 111 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines