mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-03 03:24:39 +00:00
dix: Use list for ready clients
This converts the dispatch loop into using a list of ready clients instead of an array. This changes the WaitForSomething API so that it notifies DIX when a client becomes ready to read, instead of returning the set of ready clients. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
d6eff3c31e
commit
8f1edf4bd3
6 changed files with 118 additions and 55 deletions
|
|
@ -1232,6 +1232,7 @@ IgnoreClient(ClientPtr client)
|
|||
return;
|
||||
|
||||
isItTimeToYield = TRUE;
|
||||
mark_client_not_ready(client);
|
||||
if (!GrabInProgress || FD_ISSET(connection, &AllClients)) {
|
||||
if (FD_ISSET(connection, &ClientsWithInput))
|
||||
FD_SET(connection, &IgnoredClientsWithInput);
|
||||
|
|
@ -1273,8 +1274,10 @@ AttendClient(ClientPtr client)
|
|||
FD_SET(connection, &AllClients);
|
||||
FD_SET(connection, &AllSockets);
|
||||
FD_SET(connection, &LastSelectMask);
|
||||
if (FD_ISSET(connection, &IgnoredClientsWithInput))
|
||||
if (FD_ISSET(connection, &IgnoredClientsWithInput)) {
|
||||
FD_SET(connection, &ClientsWithInput);
|
||||
mark_client_ready(client);
|
||||
}
|
||||
}
|
||||
else {
|
||||
FD_SET(connection, &SavedAllClients);
|
||||
|
|
|
|||
Loading…
Reference in a new issue