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

Comparing libcoro/coro.h (file contents):
Revision 1.60 by root, Fri Nov 18 06:22:05 2016 UTC vs.
Revision 1.61 by root, Tue Aug 14 15:46:04 2018 UTC

85 * 2016-08-27 try to disable _FORTIFY_SOURCE with CORO_SJLJ, as it 85 * 2016-08-27 try to disable _FORTIFY_SOURCE with CORO_SJLJ, as it
86 * breaks setjmp/longjmp. Also disable CORO_ASM for asm by default, 86 * breaks setjmp/longjmp. Also disable CORO_ASM for asm by default,
87 * as it was reported to crash. 87 * as it was reported to crash.
88 * 2016-11-18 disable cfi_undefined again - backtraces might be worse, but 88 * 2016-11-18 disable cfi_undefined again - backtraces might be worse, but
89 * compile compatibility is improved. 89 * compile compatibility is improved.
90 * 2018-08-14 use a completely different pthread strategy that should allow
91 * sharing of coroutines among different threads. this would
92 * undefined behaviour before as mutexes would be unlocked on
93 * a different thread. overall, this might be slower than
94 * using a pipe for synchronisation, but pipes eat fd's...
90 */ 95 */
91 96
92#ifndef CORO_H 97#ifndef CORO_H
93#define CORO_H 98#define CORO_H
94 99
404 409
405extern pthread_mutex_t coro_mutex; 410extern pthread_mutex_t coro_mutex;
406 411
407struct coro_context 412struct coro_context
408{ 413{
414 int flags;
409 pthread_cond_t cv; 415 pthread_cond_t cv;
410 pthread_t id;
411}; 416};
412 417
413void coro_transfer (coro_context *prev, coro_context *next); 418void coro_transfer (coro_context *prev, coro_context *next);
414void coro_destroy (coro_context *ctx); 419void coro_destroy (coro_context *ctx);
415 420

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines