mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-28 18:00:07 +01:00
Make dmxBEDispatch reentrant.
This commit is contained in:
parent
b94d36eb95
commit
6f17500de1
1 changed files with 6 additions and 6 deletions
|
|
@ -777,7 +777,7 @@ dmxBEDispatch (ScreenPtr pScreen)
|
|||
xcb_generic_error_t *error;
|
||||
void *reply;
|
||||
|
||||
dmxScreen->inDispatch = TRUE;
|
||||
dmxScreen->inDispatch++;
|
||||
|
||||
while ((event = xcb_poll_for_event (dmxScreen->connection)))
|
||||
{
|
||||
|
|
@ -813,6 +813,10 @@ dmxBEDispatch (ScreenPtr pScreen)
|
|||
if (reply)
|
||||
rep = (xcb_generic_reply_t *) reply;
|
||||
|
||||
dmxScreen->request.head = head->next;
|
||||
if (!dmxScreen->request.head)
|
||||
dmxScreen->request.tail = &dmxScreen->request.head;
|
||||
|
||||
if (!dmxScreenReplyCheckSync (pScreen, head->sequence, rep) &&
|
||||
!dmxScreenReplyCheckInput (pScreen, head->sequence, rep))
|
||||
{
|
||||
|
|
@ -828,14 +832,10 @@ dmxBEDispatch (ScreenPtr pScreen)
|
|||
if (error)
|
||||
free (error);
|
||||
|
||||
dmxScreen->request.head = head->next;
|
||||
if (!dmxScreen->request.head)
|
||||
dmxScreen->request.tail = &dmxScreen->request.head;
|
||||
|
||||
free (head);
|
||||
}
|
||||
|
||||
dmxScreen->inDispatch = FALSE;
|
||||
dmxScreen->inDispatch--;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue