aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-06 09:31:01 +0200
committermarha <marha@users.sourceforge.net>2012-07-06 09:31:01 +0200
commit405ae9defaaa03d4d305b6264a744107c3dd460d (patch)
treee119a54d876fa737d859718afbde7ef507702631 /xorg-server/hw/kdrive/src
parent3a5976985ab1ca641b095a72730f1f3d3bd5f9bc (diff)
parent336bad93d146931c160d8517edfdf0bee49ad9f7 (diff)
downloadvcxsrv-405ae9defaaa03d4d305b6264a744107c3dd460d.tar.gz
vcxsrv-405ae9defaaa03d4d305b6264a744107c3dd460d.tar.bz2
vcxsrv-405ae9defaaa03d4d305b6264a744107c3dd460d.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/dix/dispatch.c xorg-server/dix/privates.c xorg-server/hw/kdrive/ephyr/ephyr.c xorg-server/hw/kdrive/src/kinput.c
Diffstat (limited to 'xorg-server/hw/kdrive/src')
-rw-r--r--xorg-server/hw/kdrive/src/kinput.c40
1 files changed, 10 insertions, 30 deletions
diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c
index 9778d1fee..76424c1c5 100644
--- a/xorg-server/hw/kdrive/src/kinput.c
+++ b/xorg-server/hw/kdrive/src/kinput.c
@@ -102,34 +102,14 @@ KdSigio(int sig)
(*kdInputFds[i].read) (kdInputFds[i].fd, kdInputFds[i].closure);
}
-static void
-KdBlockSigio(void)
-{
#ifdef _MSC_VER
__asm int 3;
#else
- sigset_t set;
-
- sigemptyset(&set);
- sigaddset(&set, SIGIO);
- sigprocmask(SIG_BLOCK, &set, 0);
#endif
-}
-
-static void
-KdUnblockSigio(void)
-{
#ifdef _MSC_VER
__asm int 3;
#else
- sigset_t set;
-
- sigemptyset(&set);
- sigaddset(&set, SIGIO);
- sigprocmask(SIG_UNBLOCK, &set, 0);
#endif
-}
-
#ifdef DEBUG_SIGIO
void
@@ -281,7 +261,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)
@@ -363,7 +343,7 @@ KdEnableInput(void)
NoticeEventTime(&ev, pi->dixdev);
NoticeEventTime(&ev, ki->dixdev);
- KdUnblockSigio();
+ OsReleaseSIGIO();
}
static KdKeyboardDriver *
@@ -1824,7 +1804,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++) {
@@ -1835,7 +1815,7 @@ KdReleaseAllKeys(void)
}
}
- KdUnblockSigio();
+ OsReleaseSIGIO();
#endif
}
@@ -2031,18 +2011,18 @@ KdWakeupHandler(ScreenPtr pScreen, unsigned long lresult, pointer readmask)
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();
}
}
}
@@ -2139,10 +2119,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 = {