aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/os/io.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-02-09 23:33:44 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-17 09:40:37 +0100
commit761d74a6805e1030f2206a50834b36d807e8e107 (patch)
tree4b91038e18db1e3d2ae0a9874291c515a69848ad /nx-X11/programs/Xserver/os/io.c
parent6307e6fc72f3cd748c9dc0e601a87171131309ea (diff)
downloadnx-libs-761d74a6805e1030f2206a50834b36d807e8e107.tar.gz
nx-libs-761d74a6805e1030f2206a50834b36d807e8e107.tar.bz2
nx-libs-761d74a6805e1030f2206a50834b36d807e8e107.zip
os: Implement support for NotifyFd X_NOTIFY_WRITE and removal of AddEnabledDevices/RemoveEnabledDevices
Backported from X.org: commit be5a513fee6cbf29ef7570e57eb0436d70fbd88c Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 7 15:12:14 2015 -0800 Remove AddEnabledDevice and AddGeneralSocket APIs All uses of these interfaces should instead be using the NotifyFd API instead. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 4020aacd1fc5b9c63369f011aeb9120af9c55218 Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 11 22:02:03 2015 -0800 os: Implement support for NotifyFd X_NOTIFY_WRITE This adds the ability to be notified when a file descriptor is available for writing. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/os/io.c')
-rw-r--r--nx-X11/programs/Xserver/os/io.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c
index 87739cfb1..92a3f0476 100644
--- a/nx-X11/programs/Xserver/os/io.c
+++ b/nx-X11/programs/Xserver/os/io.c
@@ -1062,7 +1062,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
and not ready to accept more. Make a note of it and buffer
the rest. */
FD_SET(connection, &ClientsWriteBlocked);
- AnyClientsWriteBlocked = TRUE;
+ AnyWritesPending = TRUE;
if (written < oco->count)
{
@@ -1134,11 +1134,12 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
/* everything was flushed out */
oco->count = 0;
/* check to see if this client was write blocked */
- if (AnyClientsWriteBlocked)
+ if (AnyWritesPending)
{
FD_CLR(oc->fd, &ClientsWriteBlocked);
- if (! XFD_ANYSET(&ClientsWriteBlocked))
- AnyClientsWriteBlocked = FALSE;
+ if (!XFD_ANYSET(&ClientsWriteBlocked) && NumNotifyWriteFd == 0)
+ AnyWritesPending = FALSE;
+
}
if (oco->size > BUFWATERMARK)
{