From 627645acc074eab7a3694a267bc2a643d8b3e57a Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 5 Feb 2016 15:05:30 +0100 Subject: First steps in make signals more abstract from the underlying mechanism; replace epoll with poll. We now don't assume that a signal equals a single fd (eventfd on Linux). The next step would be to create a version of signal.c that uses a pipe internally, so it can be used on other platforms, like *BSD. This is also the reason epoll was replaced with poll in uplink.c --- src/server/globals.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/server/globals.h') diff --git a/src/server/globals.h b/src/server/globals.h index b0380fa..6f9652b 100644 --- a/src/server/globals.h +++ b/src/server/globals.h @@ -2,6 +2,7 @@ #define _GLOBALS_H_ #include "../types.h" +#include "../shared/signal.h" #include #include #include @@ -42,7 +43,7 @@ typedef struct struct _dnbd3_connection { int fd; // socket fd to remote server - int signal; // eventfd used to wake up the process + dnbd3_signal_t* signal; // used to wake up the process pthread_t thread; // thread holding the connection pthread_spinlock_t queueLock; // lock for synchronization on request queue etc. dnbd3_queued_request_t queue[SERVER_MAX_UPLINK_QUEUE]; -- cgit v1.2.3-55-g7522