summaryrefslogtreecommitdiff
path: root/coro.c
diff options
context:
space:
mode:
authorroot <root>2001-09-03 03:36:00 +0000
committerroot <root>2001-09-03 03:36:00 +0000
commit6de90843cb4c9052026866906ee9ebcd33c9f773 (patch)
tree4f095890508f1ade32f824fb31133599ca9d6feb /coro.c
parent1a785df222780bdd7bae43b343622150cf934cee (diff)
*** empty log message ***
Diffstat (limited to 'coro.c')
-rw-r--r--coro.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/coro.c b/coro.c
index 3cfc951..c6999a0 100644
--- a/coro.c
+++ b/coro.c
@@ -36,7 +36,7 @@
/* IRIX is decidedly NON-unix */
#if __sgi
-# define STACK_ADJUST(sp,ss) ((ss) - sizeof (long) + (char *)(sp))
+# define STACK_ADJUST(sp,ss) ((ss) - 8 + (char *)(sp))
#else
# define STACK_ADJUST(sp,ss) (ss)
#endif
@@ -182,8 +182,8 @@ void coro_create(coro_context *ctx,
# elif CORO_IRIX
setjmp (ctx->env);
- ctx->env[JB_PC] = (int)coro_init;
- ctx->env[JB_SP] = (int)((char *)sptr + ssize);
+ ctx->env[JB_PC] = (__uint64_t)coro_init;
+ ctx->env[JB_SP] = (__uint64_t)STACK_ADJUST(sptr,ssize);
# endif