diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-06-22 14:56:25 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-07-03 15:56:35 +1000 |
commit | 5d309af2ed93e91c7d72f548a11052051efbb40f (patch) | |
tree | b419c611c546100ef774bedc0372d40a74a72c23 /hw | |
parent | ff67135bec3ecea8cebeb46b42ece0a6671e231d (diff) |
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 <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/common/xf86Cursor.c | 12 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Events.c | 14 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 10 | ||||
-rw-r--r-- | hw/xfree86/common/xf86PM.c | 12 | ||||
-rw-r--r-- | hw/xfree86/os-support/shared/sigio.c | 7 |
5 files changed, 25 insertions, 30 deletions
diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c index c01cfd138..65a9e8264 100644 --- a/hw/xfree86/common/xf86Cursor.c +++ b/hw/xfree86/common/xf86Cursor.c @@ -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 * diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 4fcad4000..47429ecfe 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -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(); } } diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 526b95da6..0f8f810be 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -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 diff --git a/hw/xfree86/common/xf86PM.c b/hw/xfree86/common/xf86PM.c index 1830640d5..15257cb81 100644 --- a/hw/xfree86/common/xf86PM.c +++ b/hw/xfree86/common/xf86PM.c @@ -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; } } diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c index e9c1c0ea2..696a2151a 100644 --- a/hw/xfree86/os-support/shared/sigio.c +++ b/hw/xfree86/os-support/shared/sigio.c @@ -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 */ |