Hi Bharath,all,
On Thu, Dec 23, 2010 at 12:31 AM, Bharath H S <bhslinker@gmail.com> wrote:
It seems that I found the answer.
After reading the source code, comparing the codes of the two versions
I got the answer:
1.We can use sk_wq->wait instead of sk_wait.
2.Use reqsk_queue_empty(struct request_sock_queue*) to check if there
is a new connection to accept. (thsi method is in net/request_sock.h)
we can use it like:
struct inet_connection_sock *isock = inet_csk(socket->sk);
if(reqsk_queue_empty(&isock->icsk_accept_queue)){
//sleep here
}
I test them in my code, works well.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.orghttp://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies