… | |
… | |
82 | * alternatives you should check (e.g. using autoconf) and define the |
82 | * alternatives you should check (e.g. using autoconf) and define the |
83 | * following symbols: HAVE_UCONTEXT_H / HAVE_SETJMP_H / HAVE_SIGALTSTACK. |
83 | * following symbols: HAVE_UCONTEXT_H / HAVE_SETJMP_H / HAVE_SIGALTSTACK. |
84 | */ |
84 | */ |
85 | |
85 | |
86 | /* |
86 | /* |
87 | * This is the type for the top function of a new coroutine. |
87 | * This is the type for the initialization function of a new coroutine. |
88 | */ |
88 | */ |
89 | typedef void (*coro_func)(void *); |
89 | typedef void (*coro_func)(void *); |
90 | |
|
|
91 | |
90 | |
92 | /* |
91 | /* |
93 | * A coroutine state is saved in the following structure. Treat it as a |
92 | * A coroutine state is saved in the following structure. Treat it as a |
94 | * opaque type. errno and sigmask might be saved, but don't rely on it, |
93 | * opaque type. errno and sigmask might be saved, but don't rely on it, |
95 | * implement your own switching primitive. |
94 | * implement your own switching primitive. |