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

Comparing libcoro/coro.c (file contents):
Revision 1.23 by root, Thu Nov 30 18:21:14 2006 UTC vs.
Revision 1.24 by root, Mon Feb 12 15:56:46 2007 UTC

201#endif 201#endif
202 202
203# elif CORO_LINUX 203# elif CORO_LINUX
204 204
205 _setjmp (ctx->env); 205 _setjmp (ctx->env);
206#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) \
207 && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 0 && defined(JB_PC) && defined(JB_SP) 206#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 0 && defined (JB_PC) && defined (JB_SP)
208 ctx->env[0].__jmpbuf[JB_PC] = (long)coro_init; 207 ctx->env[0].__jmpbuf[JB_PC] = (long)coro_init;
209 ctx->env[0].__jmpbuf[JB_SP] = (long)STACK_ADJUST_PTR (sptr,ssize); 208 ctx->env[0].__jmpbuf[JB_SP] = (long)STACK_ADJUST_PTR (sptr, ssize);
210#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) \
211 && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 0 && defined(__mc68000__) 209#elif __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 0 && defined (__mc68000__)
212 ctx->env[0].__jmpbuf[0].__aregs[0] = (long int)coro_init; 210 ctx->env[0].__jmpbuf[0].__aregs[0] = (long int)coro_init;
213 ctx->env[0].__jmpbuf[0].__sp = (int *)((char *)sptr + ssize); 211 ctx->env[0].__jmpbuf[0].__sp = (int *)((char *)sptr + ssize);
214#elif defined(__GNU_LIBRARY__) && defined(__i386__) 212#elif defined (__GNU_LIBRARY__) && defined (__i386__)
215 ctx->env[0].__jmpbuf[0].__pc = (char *)coro_init; 213 ctx->env[0].__jmpbuf[0].__pc = (char *)coro_init;
216 ctx->env[0].__jmpbuf[0].__sp = (void *)((char *)sptr + ssize); 214 ctx->env[0].__jmpbuf[0].__sp = (void *)((char *)sptr + ssize);
217#elif defined(__GNU_LIBRARY__) && defined(__amd64__) 215#elif defined (__GNU_LIBRARY__) && defined (__amd64__)
218 ctx->env[0].__jmpbuf[JB_PC] = (long)coro_init; 216 ctx->env[0].__jmpbuf[JB_PC] = (long)coro_init;
219 ctx->env[0].__jmpbuf[JB_RSP] = (long)STACK_ADJUST_PTR (sptr,ssize); 217 ctx->env[0].__jmpbuf[JB_RSP] = (long)STACK_ADJUST_PTR (sptr, ssize);
220#else 218#else
221#error "linux libc or architecture not supported" 219#error "linux libc or architecture not supported"
222#endif 220#endif
223 221
224# elif CORO_IRIX 222# elif CORO_IRIX
225 223
226 setjmp (ctx->env); 224 setjmp (ctx->env);
227 ctx->env[JB_PC] = (__uint64_t)coro_init; 225 ctx->env[JB_PC] = (__uint64_t)coro_init;
228 ctx->env[JB_SP] = (__uint64_t)STACK_ADJUST_PTR (sptr,ssize); 226 ctx->env[JB_SP] = (__uint64_t)STACK_ADJUST_PTR (sptr, ssize);
229 227
230# endif 228# endif
231 229
232 coro_transfer ((coro_context *)create_coro, (coro_context *)new_coro); 230 coro_transfer ((coro_context *)create_coro, (coro_context *)new_coro);
233 231

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines