0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 10:11:53 +00:00
bird/sysdep/unix
Jan Maria Matejka 2312622923 Coroutine: use pthread_exit() instead of pthread_cancel()
The coroutine itself may hold some resources when going across pthread
cancellable points. Now it is ensured (by semaphores) that either the
main process or the coroutine is running so the coroutine is always
cancelled inside coro_suspend() where everything is clean but it will
change in future.

Instead, we explicitly mark the coroutine freeze/cancel points by
yielding there -- calling coro_suspend() and checking whether the
master process has requested to stop.

Where pthread_cancel() was, we instead set a flag and resume that
thread to finish its work and exit itself.
2018-09-13 11:10:27 +02:00
..
config.Y Config: Dropping CF_ADDTO. 2018-06-26 14:29:03 +02:00
coroutine.c Coroutine: use pthread_exit() instead of pthread_cancel() 2018-09-13 11:10:27 +02:00
endian.h OpenBSD port related changes. 2009-05-11 01:32:49 +02:00
io.c BSD: Use MSG_DONTROUTE for unicast packets on FreeBSD 2018-07-28 16:54:06 +02:00
krt.c Nest: Removing separate tmpa from route propagation 2018-05-30 17:08:49 +02:00
krt.h Nest: Removing separate tmpa from route propagation 2018-05-30 17:08:49 +02:00
krt.Y Config: Dropping CF_ADDTO. 2018-06-26 14:29:03 +02:00
log.c Timers: Fix TBF and some last remains 2017-12-07 13:53:42 +01:00
main.c Merge branch 'int-new' into mq-coro 2018-08-28 16:49:28 +02:00
Makefile Co-routines moved to a separate module with sysdep implementation 2017-07-18 23:01:06 +02:00
progdoc Doc: renamed progdoc files Doc -> progdoc to fix collision with doc/ folder on case-insensitive filesystems 2018-06-26 17:09:12 +02:00
random.c Split random number functions off io.c, so that they can be documented 2000-06-05 11:46:40 +00:00
unix.h Nest: Update to new timers 2017-12-07 13:53:42 +01:00