summaryrefslogtreecommitdiffstats
path: root/src/server/globals.h
diff options
context:
space:
mode:
authorSimon Rettberg2016-02-05 15:05:30 +0100
committerSimon Rettberg2016-02-05 15:05:30 +0100
commit627645acc074eab7a3694a267bc2a643d8b3e57a (patch)
tree5f61225803c369ab1295ce0ee36a33ae6cb51eb8 /src/server/globals.h
parent[SERVER] BREAKING: Get rid of pseudo case-insensitivity (diff)
downloaddnbd3-627645acc074eab7a3694a267bc2a643d8b3e57a.tar.gz
dnbd3-627645acc074eab7a3694a267bc2a643d8b3e57a.tar.xz
dnbd3-627645acc074eab7a3694a267bc2a643d8b3e57a.zip
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
Diffstat (limited to 'src/server/globals.h')
-rw-r--r--src/server/globals.h3
1 files changed, 2 insertions, 1 deletions
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 <stdint.h>
#include <time.h>
#include <pthread.h>
@@ -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];