mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-15 07:38:43 +00:00
2312622923
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. |
||
---|---|---|
.. | ||
config.Y | ||
coroutine.c | ||
endian.h | ||
io.c | ||
krt.c | ||
krt.h | ||
krt.Y | ||
log.c | ||
main.c | ||
Makefile | ||
progdoc | ||
random.c | ||
unix.h |