… | |
… | |
46 | # endif |
46 | # endif |
47 | #endif |
47 | #endif |
48 | |
48 | |
49 | #if CORO_SJLJ || CORO_LOOSE || CORO_LINUX || CORO_IRIX |
49 | #if CORO_SJLJ || CORO_LOOSE || CORO_LINUX || CORO_IRIX |
50 | |
50 | |
|
|
51 | #if CORO_SJLJ |
|
|
52 | # include <stdio.h> |
51 | #include <signal.h> |
53 | # include <signal.h> |
|
|
54 | #endif |
52 | |
55 | |
53 | static volatile coro_func coro_init_func; |
56 | static volatile coro_func coro_init_func; |
54 | static volatile void *coro_init_arg; |
57 | static volatile void *coro_init_arg; |
55 | static volatile coro_context *new_coro, *create_coro; |
58 | static volatile coro_context *new_coro, *create_coro; |
56 | |
59 | |
… | |
… | |
72 | |
75 | |
73 | static volatile int trampoline_count; |
76 | static volatile int trampoline_count; |
74 | |
77 | |
75 | /* trampoline signal handler */ |
78 | /* trampoline signal handler */ |
76 | static void |
79 | static void |
77 | trampoline(int sig) |
80 | trampoline (int sig) |
78 | { |
81 | { |
79 | if (setjmp (((coro_context *)new_coro)->env)) |
82 | if (setjmp (((coro_context *)new_coro)->env)) |
80 | coro_init (); /* start it */ |
83 | coro_init (); /* start it */ |
81 | else |
84 | else |
82 | trampoline_count++; |
85 | trampoline_count++; |