X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=lib%2Fsigevent.h;h=dd1ee99587b510f009d44bbfc2a1864b9d298010;hb=6398f442457ae4285e9c0ee1d7764825c571f37e;hp=a0ad88fcaaaa2b10026f19813cbdd42dd3b4b6b3;hpb=8f88441d717c0ded412543cceabf0ddd93ee9f09;p=mirror_frr.git diff --git a/lib/sigevent.h b/lib/sigevent.h index a0ad88fca..dd1ee9958 100644 --- a/lib/sigevent.h +++ b/lib/sigevent.h @@ -20,8 +20,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _QUAGGA_SIGNAL_H -#define _QUAGGA_SIGNAL_H +#ifndef _FRR_SIGNAL_H +#define _FRR_SIGNAL_H #include @@ -29,9 +29,9 @@ extern "C" { #endif -#define QUAGGA_SIGNAL_TIMER_INTERVAL 2L +#define FRR_SIGNAL_TIMER_INTERVAL 2L -struct quagga_signal_t { +struct frr_signal_t { int signal; /* signal number */ void (*handler)(void); /* handler to call */ @@ -42,17 +42,26 @@ struct quagga_signal_t { * takes: * - pointer to valid struct thread_master * - number of elements in passed in signals array - * - array of quagga_signal_t's describing signals to handle + * - array of frr_signal_t's describing signals to handle * and handlers to use for each signal */ extern void signal_init(struct thread_master *m, int sigc, - struct quagga_signal_t *signals); + struct frr_signal_t *signals); + + +/* + * Check whether any signals have been received and are pending. This is done + * with the application's key signals blocked. The complete set of signals + * is returned in 'setp', so the caller can restore them when appropriate. + * If there are pending signals, returns 'true', 'false' otherwise. + */ +bool frr_sigevent_check(sigset_t *setp); /* check whether there are signals to handle, process any found */ -extern int quagga_sigevent_process(void); +extern int frr_sigevent_process(void); #ifdef __cplusplus } #endif -#endif /* _QUAGGA_SIGNAL_H */ +#endif /* _FRR_SIGNAL_H */