aboutsummaryrefslogtreecommitdiff
path: root/lib/netlink-socket.h
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2011-07-31 14:47:32 -0700
committerJesse Gross <jesse@nicira.com>2011-09-23 15:27:49 -0700
commit1e276d1a10539a8cd97d2ad63c073a9a43f0f1ef (patch)
tree832bda11a8b73845e42712ae752ef041e340ba16 /lib/netlink-socket.h
parentbe8194bb5935141f12339085032da5d63f856f16 (diff)
poll-loop: Enable checking whether a FD caused a wakeup.
Each time we run through the poll loop, we check all file descriptors that we were waiting on to see if there is data available. However, this requires a system call and poll already provides information on which FDs caused the wakeup so it is inefficient as the number of active FDs grows. This provides a way to check whether a given FD has data.
Diffstat (limited to 'lib/netlink-socket.h')
-rw-r--r--lib/netlink-socket.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/netlink-socket.h b/lib/netlink-socket.h
index ff248583..d789f412 100644
--- a/lib/netlink-socket.h
+++ b/lib/netlink-socket.h
@@ -59,6 +59,7 @@ int nl_sock_transact(struct nl_sock *, const struct ofpbuf *request,
int nl_sock_drain(struct nl_sock *);
void nl_sock_wait(const struct nl_sock *, short int events);
+short int nl_sock_woke(const struct nl_sock *);
uint32_t nl_sock_pid(const struct nl_sock *);