WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] stubdom: Add support for select() call wi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] stubdom: Add support for select() call with NULL arguments.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2008 05:40:29 -0700
Delivery-date: Thu, 20 Mar 2008 05:42:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1205839603 0
# Node ID 312053c2da89204f9e1637373be0ee38cad4e1b3
# Parent  1eae3adc5bf7e9cfcf0cf363bf553bc075ec7390
stubdom: Add support for select() call with NULL arguments.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 extras/mini-os/lib/sys.c |   32 ++++++++++++++++++++++++++------
 1 files changed, 26 insertions(+), 6 deletions(-)

diff -r 1eae3adc5bf7 -r 312053c2da89 extras/mini-os/lib/sys.c
--- a/extras/mini-os/lib/sys.c  Tue Mar 18 11:26:21 2008 +0000
+++ b/extras/mini-os/lib/sys.c  Tue Mar 18 11:26:43 2008 +0000
@@ -837,9 +837,19 @@ int select(int nfds, fd_set *readfds, fd
     add_waiter(w4, xenbus_watch_queue);
     add_waiter(w5, kbdfront_queue);
 
-    myread = *readfds;
-    mywrite = *writefds;
-    myexcept = *exceptfds;
+    if (readfds)
+        myread = *readfds;
+    else
+        FD_ZERO(&myread);
+    if (writefds)
+        mywrite = *writefds;
+    else
+        FD_ZERO(&mywrite);
+    if (exceptfds)
+        myexcept = *exceptfds;
+    else
+        FD_ZERO(&myexcept);
+
     DEBUG("polling ");
     dump_set(nfds, &myread, &mywrite, &myexcept, timeout);
     DEBUG("\n");
@@ -878,9 +888,19 @@ int select(int nfds, fd_set *readfds, fd
        thread->wakeup_time = stop;
     schedule();
 
-    myread = *readfds;
-    mywrite = *writefds;
-    myexcept = *exceptfds;
+    if (readfds)
+        myread = *readfds;
+    else
+        FD_ZERO(&myread);
+    if (writefds)
+        mywrite = *writefds;
+    else
+        FD_ZERO(&mywrite);
+    if (exceptfds)
+        myexcept = *exceptfds;
+    else
+        FD_ZERO(&myexcept);
+
     n = select_poll(nfds, &myread, &mywrite, &myexcept);
 
     if (n) {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] stubdom: Add support for select() call with NULL arguments., Xen patchbot-unstable <=