… | |
… | |
64 | * coro_create now allows one to create source coro_contexts. |
64 | * coro_create now allows one to create source coro_contexts. |
65 | * do not rely on makecontext passing a void * correctly. |
65 | * do not rely on makecontext passing a void * correctly. |
66 | * try harder to get _setjmp/_longjmp. |
66 | * try harder to get _setjmp/_longjmp. |
67 | * major code cleanup/restructuring. |
67 | * major code cleanup/restructuring. |
68 | * 2008-11-10 the .cfi hacks are no longer needed. |
68 | * 2008-11-10 the .cfi hacks are no longer needed. |
|
|
69 | * 2008-11-16 work around a freebsd pthread bug. |
69 | */ |
70 | */ |
70 | |
71 | |
71 | #ifndef CORO_H |
72 | #ifndef CORO_H |
72 | #define CORO_H |
73 | #define CORO_H |
73 | |
74 | |
… | |
… | |
115 | * SGI's version of Microsoft's NT ;) |
116 | * SGI's version of Microsoft's NT ;) |
116 | * |
117 | * |
117 | * -DCORO_ASM |
118 | * -DCORO_ASM |
118 | * |
119 | * |
119 | * Handcoded assembly, known to work only on a few architectures/ABI: |
120 | * Handcoded assembly, known to work only on a few architectures/ABI: |
120 | * ELF Linux x86 && amd64 when gcc is used and optimisation is turned on. |
121 | * GCC + x86/IA32 and amd64/x86_64 + GNU/Linux and a few BSDs. |
121 | * |
122 | * |
122 | * -DCORO_PTHREAD |
123 | * -DCORO_PTHREAD |
123 | * |
124 | * |
124 | * Use the pthread API. You have to provide <pthread.h> and -lpthread. |
125 | * Use the pthread API. You have to provide <pthread.h> and -lpthread. |
|
|
126 | * This is likely the slowest backend, and it also does not support fork(), |
|
|
127 | * so avoid it at all costs. |
125 | * |
128 | * |
126 | * If you define neither of these symbols, coro.h will try to autodetect |
129 | * If you define neither of these symbols, coro.h will try to autodetect |
127 | * the model. This currently works for CORO_LOSER only. For the other |
130 | * the model. This currently works for CORO_LOSER only. For the other |
128 | * alternatives you should check (e.g. using autoconf) and define the |
131 | * alternatives you should check (e.g. using autoconf) and define the |
129 | * following symbols: HAVE_UCONTEXT_H / HAVE_SETJMP_H / HAVE_SIGALTSTACK. |
132 | * following symbols: HAVE_UCONTEXT_H / HAVE_SETJMP_H / HAVE_SIGALTSTACK. |