… | |
… | |
53 | * on SIGUSR2 and sigaltstack in Crossfire). |
53 | * on SIGUSR2 and sigaltstack in Crossfire). |
54 | * 2008-01-21 Disable CFI usage on anything but GNU/Linux. |
54 | * 2008-01-21 Disable CFI usage on anything but GNU/Linux. |
55 | * 2008-03-02 Switched to 2-clause BSD license with GPL exception. |
55 | * 2008-03-02 Switched to 2-clause BSD license with GPL exception. |
56 | * 2008-04-04 New (but highly unrecommended) pthreads backend. |
56 | * 2008-04-04 New (but highly unrecommended) pthreads backend. |
57 | * 2008-04-24 Reinstate CORO_LOSER (had wrong stack adjustments). |
57 | * 2008-04-24 Reinstate CORO_LOSER (had wrong stack adjustments). |
|
|
58 | * 2008-10-30 Support assembly method on x86 with and without frame pointer. |
58 | */ |
59 | */ |
59 | |
60 | |
60 | #ifndef CORO_H |
61 | #ifndef CORO_H |
61 | #define CORO_H |
62 | #define CORO_H |
62 | |
63 | |
… | |
… | |
208 | |
209 | |
209 | struct coro_context { |
210 | struct coro_context { |
210 | volatile void **sp; |
211 | volatile void **sp; |
211 | }; |
212 | }; |
212 | |
213 | |
213 | void __attribute__ ((__noinline__, __fastcall__)) |
214 | void __attribute__ ((__noinline__, __regparm__(2))) |
214 | coro_transfer (coro_context *prev, coro_context *next); |
215 | coro_transfer (coro_context *prev, coro_context *next); |
215 | |
216 | |
216 | #elif CORO_PTHREAD |
217 | #elif CORO_PTHREAD |
217 | |
218 | |
218 | #include <pthread.h> |
219 | #include <pthread.h> |