Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6411
b: refs/heads/master
c: dc40c7b
h: refs/heads/master
i:
  6409: f7ce954
  6407: 1d22310
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Aug 29, 2005
1 parent bd31c28 commit d1e8d87
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2babe1f6fea717c36c008c878fe095d1ca5696c1
refs/heads/master: dc40c7bc76054f5e4382835ca2bafb895b993a8a
10 changes: 10 additions & 0 deletions trunk/include/net/inet_connection_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
11 changes: 1 addition & 10 deletions trunk/net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,6 @@ void tcp_enter_memory_pressure(void)

EXPORT_SYMBOL(tcp_enter_memory_pressure);

/*
* LISTEN is a special case for poll..
*/
static __inline__ unsigned int tcp_listen_poll(struct sock *sk,
poll_table *wait)
{
return !reqsk_queue_empty(&inet_csk(sk)->icsk_accept_queue) ? (POLLIN | POLLRDNORM) : 0;
}

/*
* Wait for a TCP event.
*
Expand All @@ -333,7 +324,7 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait)

poll_wait(file, sk->sk_sleep, wait);
if (sk->sk_state == TCP_LISTEN)
return tcp_listen_poll(sk, wait);
return inet_csk_listen_poll(sk);

/* Socket is not locked. We are protected from async events
by poll logic and correct handling of state changes
Expand Down

0 comments on commit d1e8d87

Please sign in to comment.