aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-02-10 15:17:36 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-12 09:53:10 +0000
commitcf1335f2580ae303ace3bac6fa0d1a25c7d5b60d (patch)
tree3d2742b76900189cec64338104c846429301275a /render.c
parentinstall: add -Dterminfo to list of compile-time options (diff)
fdm: add support for managing signals
Add fdm_signal_add() and fdm_signal_del(). Signals added to the fdm will be monitored, and the provided callback called as “soon as possible” from the main context (i.e not from the signal handler context). Monitored signals are *blocked* by default. We use epoll_pwait() to unblock them while we’re polling. This allows us to do race-free signal detection. We use a single handler for all monitored signals; the handler simply updates the signal’s slot in a global array (sized to fit SIGRTMAX signals). When epoll_pwait() returns EINTR, we loop the global array. The callback associated with each signal that fired is called.
Diffstat (limited to 'render.c')
0 files changed, 0 insertions, 0 deletions