aboutsummaryrefslogtreecommitdiff
path: root/linux-core/r128_drv.c
diff options
context:
space:
mode:
authorRik Faith <faith@alephnull.com>2000-08-26 10:36:44 +0000
committerRik Faith <faith@alephnull.com>2000-08-26 10:36:44 +0000
commit6f07e1ff6bec8f306e8aa1d59b8bcaa93ffa776e (patch)
tree334961bb4f9cc7c83b95a17d6d79f3bf351bbacf /linux-core/r128_drv.c
parent37643234affb329775d3330eed650dee59d39bad (diff)
Sync with Linux 2.4.0-test7 Add signal blocking support to all drivers
(using control-z on a running direct-rendering client should work now)
Diffstat (limited to 'linux-core/r128_drv.c')
-rw-r--r--linux-core/r128_drv.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/linux-core/r128_drv.c b/linux-core/r128_drv.c
index fac88247..c4eb634d 100644
--- a/linux-core/r128_drv.c
+++ b/linux-core/r128_drv.c
@@ -656,6 +656,16 @@ int r128_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 */
}
@@ -720,5 +730,8 @@ int r128_unlock(struct inode *inode, struct file *filp, unsigned int cmd,
}
#endif
+#if LINUX_VERSION_CODE >= 0x020400 /* KERNEL_VERSION(2,4,0) */
+ unblock_all_signals();
+#endif
return 0;
}