summaryrefslogtreecommitdiffstats
path: root/runtime/nspoll.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-11-18 18:40:14 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-11-18 18:40:14 +0100
commit48ac0ffecdf244d04ed6cb4f4c560aeea5ba7f23 (patch)
tree05b6563cbb3321d725f7c671ce3e27d81807f93e /runtime/nspoll.h
parentc82f2781d2ed372e918ea5b5529ead57ff95fc2a (diff)
downloadrsyslog-48ac0ffecdf244d04ed6cb4f4c560aeea5ba7f23.tar.gz
rsyslog-48ac0ffecdf244d04ed6cb4f4c560aeea5ba7f23.tar.xz
rsyslog-48ac0ffecdf244d04ed6cb4f4c560aeea5ba7f23.zip
milestone commit: first driver layer call done
... does not really run. We can now call into the epoll driver, but not handle epoll(). The driver also needs more modifications.
Diffstat (limited to 'runtime/nspoll.h')
-rw-r--r--runtime/nspoll.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/runtime/nspoll.h b/runtime/nspoll.h
index 19efd38b..9d39e017 100644
--- a/runtime/nspoll.h
+++ b/runtime/nspoll.h
@@ -26,6 +26,15 @@
#include "netstrms.h"
+/* some operations to be portable when we do not have epoll() available */
+#define NSDPOLL_ADD 1
+#define NSDPOLL_DEL 2
+
+/* and some mode specifiers for waiting on input/output */
+#define NSDPOLL_IN 1 /* EPOLLIN */
+#define NSDPOLL_OUT 2 /* EPOLLOUT */
+/* next is 4, 8, 16, ... - must be bit values, as they are ored! */
+
/* the nspoll object */
struct nspoll_s {
BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */
@@ -41,8 +50,9 @@ BEGINinterface(nspoll) /* name must also be changed in ENDinterface macro! */
rsRetVal (*Construct)(nspoll_t **ppThis);
rsRetVal (*ConstructFinalize)(nspoll_t *pThis);
rsRetVal (*Destruct)(nspoll_t **ppThis);
- rsRetVal (*Ctl)(nspoll_t *pThis, int fd, int op, epoll_event_t *event);
- rsRetVal (*Wait)(nspoll_t *pThis, epoll_event_t *events, int maxevents, int timeout);
+ rsRetVal (*Wait)(nspoll_t *pNsdpoll, int timeout, int *idRdy, void **ppUsr);
+ rsRetVal (*Ctl)(nspoll_t *pNsdpoll, nsd_t *pNsd, int id, void *pUsr, int op);
+ rsRetVal (*IsEPollSupported)(void); /* static method */
ENDinterface(nspoll)
#define nspollCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */