Commit d04dfe3f authored by Peter Hutterer's avatar Peter Hutterer
Browse files

Drop custom sigio block/unblock functions from kdrive, ephyr and dmx


Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent 5d309af2
......@@ -227,25 +227,25 @@ dmxCoreMotion(DevicePtr pDev, int x, int y, int delta, DMXBlockType block)
&& pScreen->myNum == dmxScreen->index) {
/* Screen is old screen */
if (block)
dmxSigioBlock();
OsBlockSIGIO();
if (pDev)
enqueueMotion(pDev, localX, localY);
if (block)
dmxSigioUnblock();
OsReleaseSIGIO();
}
else {
/* Screen is new */
DMXDBG4(" New screen: old=%d new=%d localX=%d localY=%d\n",
pScreen->myNum, dmxScreen->index, localX, localY);
if (block)
dmxSigioBlock();
OsBlockSIGIO();
mieqProcessInputEvents();
miPointerSetScreen(inputInfo.pointer, dmxScreen->index,
localX, localY);
if (pDev)
enqueueMotion(pDev, localX, localY);
if (block)
dmxSigioUnblock();
OsReleaseSIGIO();
}
#if 00
miPointerGetPosition(inputInfo.pointer, &localX, &localY);
......@@ -387,12 +387,12 @@ dmxExtMotion(DMXLocalInputInfoPtr dmxLocal,
}
if (block)
dmxSigioBlock();
OsBlockSIGIO();
valuator_mask_set_range(&mask, firstAxis, axesCount, v);
QueuePointerEvents(pDevice, MotionNotify, 0, POINTER_ABSOLUTE, &mask);
if (block)
dmxSigioUnblock();
OsReleaseSIGIO();
}
static int
......@@ -492,10 +492,10 @@ dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal,
valuator_mask_set_range(&mask, ke->first_axis, ke->axes_count,
valuators);
if (block)
dmxSigioBlock();
OsBlockSIGIO();
QueueKeyboardEvents(pDevice, event, ke->keycode, &mask);
if (block)
dmxSigioUnblock();
OsReleaseSIGIO();
break;
case XI_DeviceButtonPress:
case XI_DeviceButtonRelease:
......@@ -503,11 +503,11 @@ dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal,
valuator_mask_set_range(&mask, ke->first_axis, ke->axes_count,
valuators);
if (block)
dmxSigioBlock();
OsBlockSIGIO();
QueuePointerEvents(pDevice, event, ke->keycode,
POINTER_ABSOLUTE, &mask);
if (block)
dmxSigioUnblock();
OsReleaseSIGIO();
break;
case XI_ProximityIn:
case XI_ProximityOut:
......@@ -515,10 +515,10 @@ dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal,
valuator_mask_set_range(&mask, ke->first_axis, ke->axes_count,
valuators);
if (block)
dmxSigioBlock();
OsBlockSIGIO();
QueueProximityEvents(pDevice, event, &mask);
if (block)
dmxSigioUnblock();
OsReleaseSIGIO();
break;
break;
......
......@@ -84,28 +84,6 @@ dmxSigioHandler(int sig)
}
}
/** Block SIGIO handling. */
void
dmxSigioBlock(void)
{
sigset_t s;
sigemptyset(&s);
sigaddset(&s, SIGIO);
sigprocmask(SIG_BLOCK, &s, 0);
}
/** Unblock SIGIO handling. */
void
dmxSigioUnblock(void)
{
sigset_t s;
sigemptyset(&s);
sigaddset(&s, SIGIO);
sigprocmask(SIG_UNBLOCK, &s, 0);
}
static void
dmxSigioHook(void)
{
......
......@@ -36,8 +36,6 @@
#ifndef _DMXSIGIO_H_
#define _DMXSIGIO_H_
extern void dmxSigioBlock(void);
extern void dmxSigioUnblock(void);
extern void dmxSigioEnableInput(void);
extern void dmxSigioDisableInput(void);
extern void dmxSigioRegister(DMXInputInfo * dmxInput, int fd);
......
......@@ -772,26 +772,6 @@ ephyrUpdateModifierState(unsigned int state)
}
}
static void
ephyrBlockSigio(void)
{
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGIO);
sigprocmask(SIG_BLOCK, &set, 0);
}
static void
ephyrUnblockSigio(void)
{
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGIO);
sigprocmask(SIG_UNBLOCK, &set, 0);
}
static Bool
ephyrCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y)
{
......@@ -808,11 +788,11 @@ int ephyrCurScreen; /*current event screen */
static void
ephyrWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
{
ephyrBlockSigio();
OsBlockSIGIO();
ephyrCurScreen = pScreen->myNum;
miPointerWarpCursor(inputInfo.pointer, pScreen, x, y);
ephyrUnblockSigio();
OsReleaseSIGIO();
}
miPointerScreenFuncRec ephyrPointerScreenFuncs = {
......
......@@ -102,26 +102,6 @@ KdSigio(int sig)
(*kdInputFds[i].read) (kdInputFds[i].fd, kdInputFds[i].closure);
}
static void
KdBlockSigio(void)
{
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGIO);
sigprocmask(SIG_BLOCK, &set, 0);
}
static void
KdUnblockSigio(void)
{
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGIO);
sigprocmask(SIG_UNBLOCK, &set, 0);
}
#ifdef DEBUG_SIGIO
void
......@@ -261,7 +241,7 @@ KdDisableInput(void)
KdPointerInfo *pi;
int found = 0, i = 0;
KdBlockSigio();
OsBlockSIGIO();
for (ki = kdKeyboards; ki; ki = ki->next) {
if (ki->driver && ki->driver->Disable)
......@@ -343,7 +323,7 @@ KdEnableInput(void)
NoticeEventTime(&ev, pi->dixdev);
NoticeEventTime(&ev, ki->dixdev);
KdUnblockSigio();
OsReleaseSIGIO();
}
static KdKeyboardDriver *
......@@ -1801,7 +1781,7 @@ KdReleaseAllKeys(void)
int key;
KdKeyboardInfo *ki;
KdBlockSigio();
OsBlockSIGIO();
for (ki = kdKeyboards; ki; ki = ki->next) {
for (key = ki->keySyms.minKeyCode; key < ki->keySyms.maxKeyCode; key++) {
......@@ -1812,7 +1792,7 @@ KdReleaseAllKeys(void)
}
}
KdUnblockSigio();
OsReleaseSIGIO();
#endif
}
......@@ -2009,18 +1989,18 @@ KdWakeupHandler(ScreenPtr pScreen,
if (kdInputEnabled && result > 0) {
for (i = 0; i < kdNumInputFds; i++)
if (FD_ISSET(kdInputFds[i].fd, pReadmask)) {
KdBlockSigio();
OsBlockSIGIO();
(*kdInputFds[i].read) (kdInputFds[i].fd, kdInputFds[i].closure);
KdUnblockSigio();
OsReleaseSIGIO();
}
}
for (pi = kdPointers; pi; pi = pi->next) {
if (pi->timeoutPending) {
if ((long) (GetTimeInMillis() - pi->emulationTimeout) >= 0) {
pi->timeoutPending = FALSE;
KdBlockSigio();
OsBlockSIGIO();
KdReceiveTimeout(pi);
KdUnblockSigio();
OsReleaseSIGIO();
}
}
}
......@@ -2117,10 +2097,10 @@ int KdCurScreen; /* current event screen */
static void
KdWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
{
KdBlockSigio();
OsBlockSIGIO();
KdCurScreen = pScreen->myNum;
miPointerWarpCursor(pDev, pScreen, x, y);
KdUnblockSigio();
OsReleaseSIGIO();
}
miPointerScreenFuncRec kdPointerScreenFuncs = {
......
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