diff options
author | Adam Jackson <ajax@redhat.com> | 2010-12-16 14:03:13 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2010-12-20 12:14:32 -0500 |
commit | ce13a1dbbfbeee3a3d51d0385817df50944cfdee (patch) | |
tree | 6f5ced93b1309309fb8f69cf21d048ba75e6079f /hw/xfree86/common/xf86Events.c | |
parent | a04e74cb480f98bc3dd4def2da6f6752640d9e38 (diff) |
xfree86: Remove xf86EnterServerState
Back when we had RAC this was a vaguely meaningful thing. Since then
it's been a glorified (and confusing) wrapper around xf86BlockSIGIO.
Note that the APM and VT switch code are unusual relative to other code
that cares about SIGIO state. Most callers push a SIGIO disable to
create a critical section for the duration of the caller's stack frame,
but those two effectively disable SIGIO after their return and re-enable
on their next entry.
Reviewed-by: Tiago Vignatti <tigo.vignatti@nokia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw/xfree86/common/xf86Events.c')
-rw-r--r-- | hw/xfree86/common/xf86Events.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index fdd908abd..84c0d182a 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -414,7 +414,8 @@ xf86ReleaseKeys(DeviceIntPtr pDev) static void xf86VTSwitch(void) { - int i, prevSIGIO; + int i; + static int prevSIGIO; InputInfoPtr pInfo; IHPtr ih; @@ -456,7 +457,8 @@ xf86VTSwitch(void) DisableDevice(pInfo->dev, TRUE); } } - xf86EnterServerState(SETUP); + + prevSIGIO = xf86BlockSIGIO(); for (i = 0; i < xf86NumScreens; i++) xf86Screens[i]->LeaveVT(i, 0); @@ -468,14 +470,11 @@ xf86VTSwitch(void) */ DebugF("xf86VTSwitch: Leave failed\n"); - prevSIGIO = xf86BlockSIGIO(); xf86AccessEnter(); - xf86EnterServerState(SETUP); for (i = 0; i < xf86NumScreens; i++) { if (!xf86Screens[i]->EnterVT(i, 0)) FatalError("EnterVT failed for screen %d\n", i); } - xf86EnterServerState(OPERATING); if (!(dispatchException & DE_TERMINATE)) { for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->EnableDisableFBAccess) @@ -513,11 +512,9 @@ xf86VTSwitch(void) xf86DisableIO(); } } else { - DebugF("xf86VTSwitch: Entering\n"); if (!xf86VTSwitchTo()) return; - prevSIGIO = xf86BlockSIGIO(); #ifdef XF86PM xf86OSPMClose = xf86OSPMOpen(); #endif @@ -525,13 +522,11 @@ xf86VTSwitch(void) if (xorgHWAccess) xf86EnableIO(); xf86AccessEnter(); - xf86EnterServerState(SETUP); for (i = 0; i < xf86NumScreens; i++) { xf86Screens[i]->vtSema = TRUE; if (!xf86Screens[i]->EnterVT(i, 0)) FatalError("EnterVT failed for screen %d\n", i); } - xf86EnterServerState(OPERATING); for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess)(i, TRUE); |