summaryrefslogtreecommitdiff
path: root/hw/kdrive
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-07-18 15:58:42 -0700
committerAdam Jackson <ajax@redhat.com>2016-07-21 15:04:36 -0400
commitd403aca70a07e1401cb93738f1af5961582a2e47 (patch)
tree76cc3083a096b248f4bda0477be04d9cb0b8f2ed /hw/kdrive
parent711c36558f50943c8342f25ad210281134887a3d (diff)
downloadxserver-d403aca70a07e1401cb93738f1af5961582a2e47.tar.gz
Switch poll() users to xserver_poll()
This uses the wrapper in case we need to emulate poll with select as we do on Windows. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/kdrive')
-rw-r--r--hw/kdrive/linux/mouse.c6
-rw-r--r--hw/kdrive/linux/ms.c4
-rw-r--r--hw/kdrive/linux/ps2.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/hw/kdrive/linux/mouse.c b/hw/kdrive/linux/mouse.c
index 3508b1761..6bdd28651 100644
--- a/hw/kdrive/linux/mouse.c
+++ b/hw/kdrive/linux/mouse.c
@@ -27,7 +27,7 @@
#include <termios.h>
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <poll.h>
+#include <xserver_poll.h>
#include "inputstr.h"
#include "scrnintstr.h"
#include "kdrive.h"
@@ -55,7 +55,7 @@ MouseWaitForReadable(int fd, int timeout)
poll_fd.fd = fd;
poll_fd.events = POLLIN;
for (;;) {
- n = poll(&poll_fd, 1, timeout);
+ n = xserver_poll(&poll_fd, 1, timeout);
if (n > 0)
return TRUE;
if (n < 0 && (errno == EAGAIN || errno == EINTR)) {
@@ -136,7 +136,7 @@ MouseWaitForWritable(int fd, int timeout)
poll_fd.fd = fd;
poll_fd.events = POLLOUT;
- n = poll(&poll_fd, 1, timeout);
+ n = xserver_poll(&poll_fd, 1, timeout);
if (n > 0)
return TRUE;
return FALSE;
diff --git a/hw/kdrive/linux/ms.c b/hw/kdrive/linux/ms.c
index 79e6373dd..3934682ad 100644
--- a/hw/kdrive/linux/ms.c
+++ b/hw/kdrive/linux/ms.c
@@ -26,7 +26,7 @@ THE SOFTWARE.
#endif
#include <errno.h>
#include <termios.h>
-#include <poll.h>
+#include <xserver_poll.h>
#include <X11/X.h>
#include <X11/Xproto.h>
#include "inputstr.h"
@@ -51,7 +51,7 @@ MsReadBytes(int fd, char *buf, int len, int min)
}
if (tot % min == 0)
break;
- n = poll(&poll_fd, 1, 100);
+ n = xserver_poll(&poll_fd, 1, 100);
if (n <= 0)
break;
}
diff --git a/hw/kdrive/linux/ps2.c b/hw/kdrive/linux/ps2.c
index 5d4a8eb33..4fec02408 100644
--- a/hw/kdrive/linux/ps2.c
+++ b/hw/kdrive/linux/ps2.c
@@ -25,7 +25,7 @@
#endif
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <poll.h>
+#include <xserver_poll.h>
#include "inputstr.h"
#include "scrnintstr.h"
#include "kdrive.h"
@@ -48,7 +48,7 @@ Ps2ReadBytes(int fd, char *buf, int len, int min)
}
if (tot % min == 0)
break;
- n = poll(&poll_fd, 1, 100);
+ n = xserver_poll(&poll_fd, 1, 100);
if (n <= 0)
break;
}