summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2005-08-24 06:52:58 +0200
committerDavid S. Miller2005-08-30 01:05:32 +0200
commitdc40c7bc76054f5e4382835ca2bafb895b993a8a (patch)
tree70951f8d97dc191df3c772c830b667ad7af6dfd9 /include
parent[DCCP]: Introduce dccp_get_info (diff)
downloadkernel-qcow2-linux-dc40c7bc76054f5e4382835ca2bafb895b993a8a.tar.gz
kernel-qcow2-linux-dc40c7bc76054f5e4382835ca2bafb895b993a8a.tar.xz
kernel-qcow2-linux-dc40c7bc76054f5e4382835ca2bafb895b993a8a.zip
[ICSK]: Generalise tcp_listen_poll
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/inet_connection_sock.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 4d7e708c07d1..8a87a3a4f107 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -260,6 +260,16 @@ extern void inet_csk_reqsk_queue_prune(struct sock *parent,
const unsigned long max_rto);
extern void inet_csk_destroy_sock(struct sock *sk);
+
+/*
+ * LISTEN is a special case for poll..
+ */
+static inline unsigned int inet_csk_listen_poll(const struct sock *sk)
+{
+ return !reqsk_queue_empty(&inet_csk(sk)->icsk_accept_queue) ?
+ (POLLIN | POLLRDNORM) : 0;
+}
+
extern int inet_csk_listen_start(struct sock *sk, const int nr_table_entries);
extern void inet_csk_listen_stop(struct sock *sk);