public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <sezeroz@ttnet.net.tr>
To: <linux-kernel@vger.kernel.org>
Cc: <marcelo.tosatti@cyclades.com>
Subject: 2.4.28-rc1, more lost patches [1/10]
Date: Wed, 27 Oct 2004 12:51:45 +0300	[thread overview]
Message-ID: <20041027095145.KDRQ6935.fep01.ttnet.net.tr@localhost> (raw)

[-- Attachment #1: Type: text/plain, Size: 101 bytes --]


[10/10] Krzysztof Halasa: AF_UNIX dgram select problem;
from (only in) -ac/redhat. To be reviewed.


[-- Attachment #2: af_unix-dgram_poll.patch --]
[-- Type: application/octet-stream, Size: 1840 bytes --]

Krzysztof Halasa
first discussion/thread:
 http://marc.theaimsgroup.com/?t=105465240900005&r=1&w=2
Patch then posted at:
 http://marc.theaimsgroup.com/?l=linux-kernel&m=105560475819610&w=2

No further discussion seems to appear thereafter.

only in ac/redhat, _NOT_ in 2.6

diff -urN 28rc1/net/unix/af_unix.c 28rc1_aac/net/unix/af_unix.c
--- 28rc1/net/unix/af_unix.c	2002-11-29 01:53:16.000000000 +0200
+++ 28rc1_aac/net/unix/af_unix.c	2004-10-24 00:58:12.000000000 +0300
@@ -1707,6 +1707,39 @@
 	return err;
 }
 
+static unsigned int dgram_poll(struct file * file, struct socket *sock,
+			       poll_table *wait)
+{
+        struct sock *sk = sock->sk;
+        unsigned int mask;
+	unix_socket *other;
+
+        poll_wait(file, sk->sleep, wait);
+        mask = 0;
+
+        /* exceptional events? */
+        if (sk->err || !skb_queue_empty(&sk->error_queue))
+                mask |= POLLERR;
+        if (sk->shutdown == SHUTDOWN_MASK)
+                mask |= POLLHUP;
+
+        /* readable? */
+        if (!skb_queue_empty(&sk->receive_queue) ||
+            (sk->shutdown & RCV_SHUTDOWN))
+                mask |= POLLIN | POLLRDNORM;
+
+        /* writable? */
+	other = unix_peer_get(sk);
+	if (sock_writeable(sk) &&
+	    (other == NULL ||
+	     skb_queue_len(&other->receive_queue) <= other->max_ack_backlog))
+                mask |= POLLOUT | POLLWRNORM | POLLWRBAND;
+        else
+                set_bit(SOCK_ASYNC_NOSPACE, &sk->socket->flags);
+
+	return mask;
+}
+
 static unsigned int unix_poll(struct file * file, struct socket *sock, poll_table *wait)
 {
 	struct sock *sk = sock->sk;
@@ -1836,7 +1869,7 @@
 	socketpair:	unix_socketpair,
 	accept:		sock_no_accept,
 	getname:	unix_getname,
-	poll:		datagram_poll,
+	poll:		dgram_poll,
 	ioctl:		unix_ioctl,
 	listen:		sock_no_listen,
 	shutdown:	unix_shutdown,

             reply	other threads:[~2004-10-27 10:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-27  9:51 sezeroz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-10-27 12:59 2.4.28-rc1, more lost patches [1/10] O.Sezer
2004-10-27  9:42 sezeroz
2004-10-27  9:29 sezeroz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041027095145.KDRQ6935.fep01.ttnet.net.tr@localhost \
    --to=sezeroz@ttnet.net.tr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox