Commit 5d309af2 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

xfree86: drop ddx-specific SIGIO blocking



The hooks are left for this cycle, we can drop it next cycle once the
drivers that need it (e.g. wacom) have been updated.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent ff67135b
......@@ -199,7 +199,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
ScrnInfoPtr pScr = xf86ScreenToScrn(pScreen);
ScreenPtr pCursorScreen;
Bool Switched;
int px, py, was_blocked;
int px, py;
DeviceIntPtr dev, it;
if (!pScr->vtSema || !mode || !pScr->SwitchMode)
......@@ -228,7 +228,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
if (pScreen == pCursorScreen)
miPointerGetPosition(dev, &px, &py);
was_blocked = xf86BlockSIGIO();
OsBlockSIGIO();
Switched = (*pScr->SwitchMode) (pScr, mode);
if (Switched) {
pScr->currentMode = mode;
......@@ -267,7 +267,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
pScr->frameY1 = pScr->virtualY - 1;
}
}
xf86UnblockSIGIO(was_blocked);
OsReleaseSIGIO();
if (pScr->AdjustFrame)
(*pScr->AdjustFrame) (pScr, pScr->frameX0, pScr->frameY0);
......@@ -469,13 +469,11 @@ xf86CrossScreen(ScreenPtr pScreen, Bool entering)
static void
xf86WarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
{
int sigstate;
sigstate = xf86BlockSIGIO();
OsBlockSIGIO();
miPointerWarpCursor(pDev, pScreen, x, y);
xf86Info.currentScreen = pScreen;
xf86UnblockSIGIO(sigstate);
OsReleaseSIGIO();
}
void *
......
......@@ -254,7 +254,7 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask)
while (pInfo) {
if (pInfo->read_input && pInfo->fd >= 0 &&
(FD_ISSET(pInfo->fd, &devicesWithInput) != 0)) {
int sigstate = xf86BlockSIGIO();
OsBlockSIGIO();
/*
* Remove the descriptior from the set because more than one
......@@ -263,7 +263,7 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask)
FD_CLR(pInfo->fd, &devicesWithInput);
pInfo->read_input(pInfo);
xf86UnblockSIGIO(sigstate);
OsReleaseSIGIO();
}
pInfo = pInfo->next;
}
......@@ -397,9 +397,9 @@ xf86ReleaseKeys(DeviceIntPtr pDev)
for (i = keyc->xkbInfo->desc->min_key_code;
i < keyc->xkbInfo->desc->max_key_code; i++) {
if (key_is_down(pDev, i, KEY_POSTED)) {
sigstate = xf86BlockSIGIO();
OsBlockSIGIO();
QueueKeyboardEvents(pDev, KeyRelease, i, NULL);
xf86UnblockSIGIO(sigstate);
OsReleaseSIGIO();
}
}
}
......@@ -457,7 +457,7 @@ xf86VTSwitch(void)
}
}
prevSIGIO = xf86BlockSIGIO();
OsBlockSIGIO();
for (i = 0; i < xf86NumScreens; i++)
xf86Screens[i]->LeaveVT(xf86Screens[i]);
......@@ -492,7 +492,7 @@ xf86VTSwitch(void)
for (ih = InputHandlers; ih; ih = ih->next)
xf86EnableInputHandler(ih);
xf86UnblockSIGIO(prevSIGIO);
OsReleaseSIGIO();
}
else {
......@@ -549,7 +549,7 @@ xf86VTSwitch(void)
for (ih = InputHandlers; ih; ih = ih->next)
xf86EnableInputHandler(ih);
xf86UnblockSIGIO(prevSIGIO);
OsReleaseSIGIO();
}
}
......
......@@ -394,7 +394,7 @@ InstallSignalHandlers(void)
void
InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
{
int i, j, k, scr_index, was_blocked = 0;
int i, j, k, scr_index;
char **modulelist;
pointer *optionlist;
Pix24Flags screenpix24, pix24;
......@@ -806,7 +806,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ);
#endif
xf86AccessEnter();
was_blocked = xf86BlockSIGIO();
OsBlockSIGIO();
}
}
......@@ -879,7 +879,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
}
xf86VGAarbiterWrapFunctions();
xf86UnblockSIGIO(was_blocked);
OsReleaseSIGIO();
xf86InitOrigins();
......@@ -964,7 +964,7 @@ OsVendorInit(void)
}
#endif
#endif
xf86UnblockSIGIO(0);
OsReleaseSIGIO();
beenHere = TRUE;
}
......@@ -1023,7 +1023,7 @@ AbortDDX(enum ExitCode error)
{
int i;
xf86BlockSIGIO();
OsBlockSIGIO();
/*
* try to restore the original video state
......
......@@ -92,8 +92,6 @@ eventName(pmEvent event, const char **str)
}
}
static int sigio_blocked_for_suspend;
static void
suspend(pmEvent event, Bool undo)
{
......@@ -109,7 +107,7 @@ suspend(pmEvent event, Bool undo)
DisableDevice(pInfo->dev, TRUE);
pInfo = pInfo->next;
}
sigio_blocked_for_suspend = xf86BlockSIGIO();
OsBlockSIGIO();
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->PMEvent)
xf86Screens[i]->PMEvent(xf86Screens[i], event, undo);
......@@ -137,7 +135,7 @@ resume(pmEvent event, Bool undo)
xf86Screens[i]->EnterVT(xf86Screens[i]);
}
}
xf86UnblockSIGIO(sigio_blocked_for_suspend);
OsReleaseSIGIO();
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->EnableDisableFBAccess)
(*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], TRUE);
......@@ -153,7 +151,7 @@ resume(pmEvent event, Bool undo)
static void
DoApmEvent(pmEvent event, Bool undo)
{
int i, was_blocked;
int i;
switch (event) {
#if 0
......@@ -184,13 +182,13 @@ DoApmEvent(pmEvent event, Bool undo)
}
break;
default:
was_blocked = xf86BlockSIGIO();
OsBlockSIGIO();
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->PMEvent) {
xf86Screens[i]->PMEvent(xf86Screens[i], event, undo);
}
}
xf86UnblockSIGIO(was_blocked);
OsReleaseSIGIO();
break;
}
}
......
......@@ -132,7 +132,6 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
struct sigaction sa;
struct sigaction osa;
int i;
int blocked;
int installed = FALSE;
if (!xf86Info.useSIGIO)
......@@ -142,7 +141,7 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
if (!xf86SigIOFuncs[i].f) {
if (xf86IsPipe(fd))
return 0;
blocked = xf86BlockSIGIO();
OsBlockSIGIO();
#ifdef O_ASYNC
if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_ASYNC) == -1) {
xf86Msg(X_WARNING, "fcntl(%d, O_ASYNC): %s\n",
......@@ -170,7 +169,7 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
}
#endif
if (!installed) {
xf86UnblockSIGIO(blocked);
OsReleaseSIGIO();
return 0;
}
sigemptyset(&sa.sa_mask);
......@@ -186,7 +185,7 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
if (fd >= xf86SigIOMaxFd)
xf86SigIOMaxFd = fd + 1;
FD_SET(fd, &xf86SigIOMask);
xf86UnblockSIGIO(blocked);
OsReleaseSIGIO();
return 1;
}
/* Allow overwriting of the closure and callback */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment