From ac592223bc7e1592620cfeaa0aad3331b6b012bf Mon Sep 17 00:00:00 2001 From: pcg Date: Thu, 1 Apr 2004 03:11:15 +0000 Subject: *** empty log message *** --- coro.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'coro.h') diff --git a/coro.h b/coro.h index 87de6e9..e6c5ad9 100644 --- a/coro.h +++ b/coro.h @@ -30,7 +30,7 @@ * go to Ralf S. Engelschall . * * This coroutine library is very much stripped down. You should either - * build your own process avstraction using it or - better - just use GNU + * build your own process abstraction using it or - better - just use GNU * Portable Threads, http://www.gnu.org/software/pth/. * * VERSION: 0.1 @@ -103,9 +103,9 @@ typedef struct coro_context coro_context; * Allocating/deallocating the stack is your own responsibility, so there is * no coro_destroy function. */ -void coro_create(coro_context *ctx, - coro_func coro, void *arg, - void *sptr, long ssize); +void coro_create (coro_context *ctx, + coro_func coro, void *arg, + void *sptr, long ssize); /* * The following prototype defines the coroutine switching function. It is @@ -145,7 +145,7 @@ struct coro_context { ucontext_t uc; }; -#define coro_transfer(p,n) swapcontext(&((p)->uc), &((n)->uc)) +#define coro_transfer(p,n) swapcontext (&((p)->uc), &((n)->uc)) #elif CORO_SJLJ || CORO_LOOSE || CORO_LINUX || CORO_IRIX @@ -155,7 +155,7 @@ struct coro_context { jmp_buf env; }; -#define coro_transfer(p,n) if (!setjmp ((p)->env)) longjmp ((n)->env, 1) +#define coro_transfer(p,n) do { if (!setjmp ((p)->env)) longjmp ((n)->env, 1); } while(0) #endif -- cgit v1.2.3