From 336bad93d146931c160d8517edfdf0bee49ad9f7 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 6 Jul 2012 09:12:35 +0200 Subject: randrproto fontconfig mesa xserver git update 6 Jul 2012 --- xorg-server/hw/xfree86/os-support/shared/sigio.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'xorg-server/hw/xfree86/os-support/shared') diff --git a/xorg-server/hw/xfree86/os-support/shared/sigio.c b/xorg-server/hw/xfree86/os-support/shared/sigio.c index 231d6c04f..f3c153b89 100644 --- a/xorg-server/hw/xfree86/os-support/shared/sigio.c +++ b/xorg-server/hw/xfree86/os-support/shared/sigio.c @@ -136,7 +136,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) @@ -146,7 +145,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", @@ -174,7 +173,7 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure) } #endif if (!installed) { - xf86UnblockSIGIO(blocked); + OsReleaseSIGIO(); return 0; } sigemptyset(&sa.sa_mask); @@ -190,7 +189,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 */ @@ -263,26 +262,13 @@ xf86RemoveSIGIOHandler(int fd) int xf86BlockSIGIO(void) { - sigset_t set, old; - int ret; - - sigemptyset(&set); - sigaddset(&set, SIGIO); - sigprocmask(SIG_BLOCK, &set, &old); - ret = sigismember(&old, SIGIO); - return ret; + return OsBlockSIGIO(); } void xf86UnblockSIGIO(int wasset) { - sigset_t set; - - if (!wasset) { - sigemptyset(&set); - sigaddset(&set, SIGIO); - sigprocmask(SIG_UNBLOCK, &set, NULL); - } + OsReleaseSIGIO(); } void -- cgit v1.2.3