summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-12-08 14:39:46 -0800
committerKeith Packard <keithp@keithp.com>2016-05-26 16:07:54 -0700
commit6a5a4e60373c1386b311b2a8bb666c32d68a9d99 (patch)
tree1643ea974c60cefb7dbd6d646e40d77263babaa3 /dix
parent8cf832c288dec13cbf3c25478a8ccef52d61f3db (diff)
Remove SIGIO support for input [v5]
This removes all of the SIGIO handling support used for input throughout the X server, preparing the way for using threads for input handling instead. Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls to stub functions input_lock/input_unlock so that we don't lose this information. xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO. v2: Don't change locking order (Peter Hutterer) v3: Comment weird && FALSE in xf86Helper.c Leave errno save/restore in xf86ReadInput Squash with stub adding patch (Peter Hutterer) v4: Leave UseSIGIO config parameter so that existing config files don't break (Peter Hutterer) v5: Split a couple of independent patch bits out of kinput.c (Peter Hutterer) Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r--dix/devices.c10
-rw-r--r--dix/ptrveloc.c4
-rw-r--r--dix/touch.c8
3 files changed, 11 insertions, 11 deletions
diff --git a/dix/devices.c b/dix/devices.c
index fcd0c08fa..9de84a627 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -493,14 +493,14 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
FreeSprite(dev);
- /* now that the device is disabled, we can reset the signal handler's
+ /* now that the device is disabled, we can reset the event reader's
* last.slave */
- OsBlockSignals();
+ input_lock();
for (other = inputInfo.devices; other; other = other->next) {
if (other->last.slave == dev)
other->last.slave = NULL;
}
- OsReleaseSignals();
+ input_unlock();
LeaveWindow(dev);
SetFocusOut(dev);
@@ -1033,7 +1033,7 @@ CloseDownDevices(void)
{
DeviceIntPtr dev;
- OsBlockSignals();
+ input_lock();
/* Float all SDs before closing them. Note that at this point resources
* (e.g. cursors) have been freed already, so we can't just call
@@ -1060,7 +1060,7 @@ CloseDownDevices(void)
XkbDeleteRulesDflts();
XkbDeleteRulesUsed();
- OsReleaseSignals();
+ input_unlock();
}
/**
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 727602e44..ff39d7bba 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -165,7 +165,7 @@ AccelerationDefaultCleanup(DeviceIntPtr dev)
* AccelSchemeProc(), but that seems impossible. Schemes don't get
* switched often anyway.
*/
- OsBlockSignals();
+ input_lock();
dev->valuator->accelScheme.AccelSchemeProc = NULL;
FreeVelocityData(vel);
free(vel);
@@ -175,7 +175,7 @@ AccelerationDefaultCleanup(DeviceIntPtr dev)
accelData);
free(dev->valuator->accelScheme.accelData);
dev->valuator->accelScheme.accelData = NULL;
- OsReleaseSignals();
+ input_unlock();
}
}
diff --git a/dix/touch.c b/dix/touch.c
index 54da13247..4c0412a17 100644
--- a/dix/touch.c
+++ b/dix/touch.c
@@ -79,7 +79,7 @@ TouchResizeQueue(ClientPtr client, void *closure)
{
int i;
- OsBlockSignals();
+ input_lock();
/* first two ids are reserved */
for (i = 2; i < MAXDEVICES; i++) {
@@ -112,7 +112,7 @@ TouchResizeQueue(ClientPtr client, void *closure)
}
}
- OsReleaseSignals();
+ input_unlock();
return TRUE;
}
@@ -1077,7 +1077,7 @@ TouchEndPhysicallyActiveTouches(DeviceIntPtr dev)
InternalEvent *eventlist = InitEventList(GetMaximumEventsNum());
int i;
- OsBlockSignals();
+ input_lock();
mieqProcessInputEvents();
for (i = 0; i < dev->last.num_touches; i++) {
DDXTouchPointInfoPtr ddxti = dev->last.touches + i;
@@ -1091,7 +1091,7 @@ TouchEndPhysicallyActiveTouches(DeviceIntPtr dev)
mieqProcessDeviceEvent(dev, eventlist + j, NULL);
}
}
- OsReleaseSignals();
+ input_unlock();
FreeEventList(eventlist, GetMaximumEventsNum());
}