4 #include "ntp_refclock.h"
7 * Some systems (MOST) define SIGPOLL == SIGIO, others SIGIO == SIGPOLL, and
8 * a few have separate SIGIO and SIGPOLL signals. This code checks for the
9 * SIGIO == SIGPOLL case at compile time.
10 * Do not define USE_SIGPOLL or USE_SIGIO.
11 * these are interal only to iosignal.c and ntpd/work_fork.c!
13 #if defined(USE_SIGPOLL)
16 #if defined(USE_SIGIO)
20 /* type of input handler function - only shared between iosignal.c and ntp_io.c */
21 typedef void (input_handler_t)(l_fp *);
23 #if defined(HAVE_SIGNALED_IO)
24 # if defined(USE_TTY_SIGPOLL) || defined(USE_UDP_SIGPOLL)
28 # if !defined(USE_TTY_SIGPOLL) || !defined(USE_UDP_SIGPOLL)
32 # if defined(USE_SIGIO) && defined(USE_SIGPOLL)
36 # endif /* SIGIO == SIGPOLL */
37 # endif /* USE_SIGIO && USE_SIGPOLL */
39 #define USING_SIGIO() using_sigio
41 extern int using_sigio;
43 extern void block_sigio (void);
44 extern void unblock_sigio (void);
45 extern int init_clock_sig (struct refclockio *);
46 extern void init_socket_sig (int);
47 extern void set_signal (input_handler_t *);
49 # define BLOCKIO() block_sigio()
50 # define UNBLOCKIO() unblock_sigio()
52 #else /* !HAVE_SIGNALED_IO follows */
53 # define BLOCKIO() do {} while (0)
54 # define UNBLOCKIO() do {} while (0)
55 # define USING_SIGIO() FALSE
58 #endif /* IOSIGNAL_H */