summaryrefslogtreecommitdiff
path: root/linux/sis_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/sis_drv.c')
-rw-r--r--linux/sis_drv.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/linux/sis_drv.c b/linux/sis_drv.c
index 5dda149a..434a1ccd 100644
--- a/linux/sis_drv.c
+++ b/linux/sis_drv.c
@@ -626,6 +626,16 @@ int sis_lock(struct inode *inode, struct file *filp, unsigned int cmd,
#endif
if (!ret) {
+#if LINUX_VERSION_CODE >= 0x020400 /* KERNEL_VERSION(2,4,0) */
+ sigemptyset(&dev->sigmask);
+ sigaddset(&dev->sigmask, SIGSTOP);
+ sigaddset(&dev->sigmask, SIGTSTP);
+ sigaddset(&dev->sigmask, SIGTTIN);
+ sigaddset(&dev->sigmask, SIGTTOU);
+ dev->sigdata.context = lock.context;
+ dev->sigdata.lock = dev->lock.hw_lock;
+ block_all_signals(drm_notifier, &dev->sigdata, &dev->sigmask);
+#endif
if (lock.flags & _DRM_LOCK_READY) {
/* Wait for space in DMA/FIFO */
}
@@ -676,7 +686,10 @@ int sis_unlock(struct inode *inode, struct file *filp, unsigned int cmd,
DRM_ERROR("\n");
}
}
-
+
+#if LINUX_VERSION_CODE >= 0x020400 /* KERNEL_VERSION(2,4,0) */
+ unblock_all_signals();
+#endif
return 0;
}