summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2018-02-14 11:12:29 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2018-02-15 08:31:27 +0100
commit7503135a72ab47928f5db838273851693b0dddbb (patch)
treedbfc4aa4bb8cb0ec80da01a97ff56feb5e50dbdf
parent69632d06e2bf255b002d39df49aaf99ae86eaf4e (diff)
legacy: Avoid using the xf86[Un]blockSigio functions
They have been deprecated since mouse doesn't use SIGIO anymore. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Deepak Rawat <drawat@vmware.com>
-rw-r--r--src/vmware.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/vmware.c b/src/vmware.c
index 1af20d8..211d69d 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -131,11 +131,21 @@ vmwareReadReg(VMWAREPtr pVMWARE, int index)
* Block SIGIO for the duration, so we don't get interrupted after the
* outl but before the inl by a mouse move (which write to our registers).
*/
- int oldsigio, ret;
+ int ret;
+#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 22)
+ int oldsigio;
+
oldsigio = xf86BlockSIGIO();
+#else
+ input_lock();
+#endif
outl(pVMWARE->indexReg, index);
ret = inl(pVMWARE->valueReg);
+#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 22)
xf86UnblockSIGIO(oldsigio);
+#else
+ input_unlock();
+#endif
return ret;
}
@@ -146,11 +156,19 @@ vmwareWriteReg(VMWAREPtr pVMWARE, int index, CARD32 value)
* Block SIGIO for the duration, so we don't get interrupted in between
* the outls by a mouse move (which write to our registers).
*/
+#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 22)
int oldsigio;
oldsigio = xf86BlockSIGIO();
+#else
+ input_lock();
+#endif
outl(pVMWARE->indexReg, index);
outl(pVMWARE->valueReg, value);
+#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 22)
xf86UnblockSIGIO(oldsigio);
+#else
+ input_unlock();
+#endif
}
void