summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2010-12-16 14:26:10 -0500
committerAdam Jackson <ajax@redhat.com>2010-12-20 12:15:14 -0500
commit56d9c736f0c450bffd43300107689eb6dd1ea70b (patch)
tree7b4a56f9e9fd965fb339098993f9286178841fef
parentce13a1dbbfbeee3a3d51d0385817df50944cfdee (diff)
xfree86: Convert some xf86BlockSIGIO to OsBlockSignals
The DDC1 and int10 code are blocking SIGIO to get some assurance that their usleep() calls take as long as they expect. That's a good start but you really want to be blocking more than just SIGIO, SIGALRM too at minimum. At this point, except for SIGIO handler setup itself, BlockSIGIO really means "block input events". Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--hw/xfree86/ddc/ddc.c11
-rw-r--r--hw/xfree86/int10/helper_exec.c5
2 files changed, 7 insertions, 9 deletions
diff --git a/hw/xfree86/ddc/ddc.c b/hw/xfree86/ddc/ddc.c
index 7c7dc9c6b..179f42ccd 100644
--- a/hw/xfree86/ddc/ddc.c
+++ b/hw/xfree86/ddc/ddc.c
@@ -235,15 +235,12 @@ EDIDRead_DDC1(ScrnInfoPtr pScrn, DDC1SetSpeedProc DDCSpeed,
* @return NULL if no monitor attached or failure to interpret the EDID.
*/
xf86MonPtr
-xf86DoEDID_DDC1(
- int scrnIndex, DDC1SetSpeedProc DDC1SetSpeed,
- unsigned int (*DDC1Read)(ScrnInfoPtr)
-)
+xf86DoEDID_DDC1(int scrnIndex, DDC1SetSpeedProc DDC1SetSpeed,
+ unsigned int (*DDC1Read)(ScrnInfoPtr))
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
unsigned char *EDID_block = NULL;
xf86MonPtr tmp = NULL;
- int sigio;
/* Default DDC and DDC1 to enabled. */
Bool noddc = FALSE, noddc1 = FALSE;
OptionInfoPtr options;
@@ -259,9 +256,9 @@ xf86DoEDID_DDC1(
if (noddc || noddc1)
return NULL;
- sigio = xf86BlockSIGIO();
+ OsBlockSignals();
EDID_block = EDIDRead_DDC1(pScrn,DDC1SetSpeed,DDC1Read);
- xf86UnblockSIGIO(sigio);
+ OsReleaseSignals();
if (EDID_block){
tmp = xf86InterpretEDID(scrnIndex,EDID_block);
diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index 55ab05866..b9af473b1 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -75,13 +75,14 @@ setup_int(xf86Int10InfoPtr pInt)
if (pInt->Flags & SET_BIOS_SCRATCH)
SetResetBIOSVars(pInt, TRUE);
#endif
- return xf86BlockSIGIO();
+ OsBlockSignals();
+ return 0;
}
void
finish_int(xf86Int10InfoPtr pInt, int sig)
{
- xf86UnblockSIGIO(sig);
+ OsReleaseSignals();
pInt->ax = (CARD32) X86_EAX;
pInt->bx = (CARD32) X86_EBX;
pInt->cx = (CARD32) X86_ECX;