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

Comparing libcoro/coro.c (file contents):
Revision 1.5 by root, Mon Sep 3 02:50:18 2001 UTC vs.
Revision 1.6 by root, Mon Sep 3 03:36:00 2001 UTC

34 34
35#if CORO_SJLJ || CORO_LOOSE || CORO_LINUX || CORO_IRIX 35#if CORO_SJLJ || CORO_LOOSE || CORO_LINUX || CORO_IRIX
36 36
37/* IRIX is decidedly NON-unix */ 37/* IRIX is decidedly NON-unix */
38#if __sgi 38#if __sgi
39# define STACK_ADJUST(sp,ss) ((ss) - sizeof (long) + (char *)(sp)) 39# define STACK_ADJUST(sp,ss) ((ss) - 8 + (char *)(sp))
40#else 40#else
41# define STACK_ADJUST(sp,ss) (ss) 41# define STACK_ADJUST(sp,ss) (ss)
42#endif 42#endif
43 43
44#include <signal.h> 44#include <signal.h>
180#endif 180#endif
181 181
182# elif CORO_IRIX 182# elif CORO_IRIX
183 183
184 setjmp (ctx->env); 184 setjmp (ctx->env);
185 ctx->env[JB_PC] = (int)coro_init; 185 ctx->env[JB_PC] = (__uint64_t)coro_init;
186 ctx->env[JB_SP] = (int)((char *)sptr + ssize); 186 ctx->env[JB_SP] = (__uint64_t)STACK_ADJUST(sptr,ssize);
187 187
188# endif 188# endif
189 189
190 coro_transfer ((coro_context *)create_coro, (coro_context *)new_coro); 190 coro_transfer ((coro_context *)create_coro, (coro_context *)new_coro);
191 191

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines