summaryrefslogtreecommitdiff
path: root/xvmc/intel_xvmc.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-13 09:31:50 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-13 09:31:50 +0100
commitcd381ad96eadb72eb1a983c973a5dd47f547fc8b (patch)
treef36bc63016e7efaa3b0eb77a68f1a7eb624db390 /xvmc/intel_xvmc.c
parentbccfb768ee14348b6db5b140fdd6df5fdbfcad0c (diff)
xvmc: Refactor mutex locking
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'xvmc/intel_xvmc.c')
-rw-r--r--xvmc/intel_xvmc.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/xvmc/intel_xvmc.c b/xvmc/intel_xvmc.c
index 2a2c8b9a..9a09aeb8 100644
--- a/xvmc/intel_xvmc.c
+++ b/xvmc/intel_xvmc.c
@@ -103,21 +103,6 @@ unsigned int mb_bytes_420[] = {
768 /* 111111 */
};
-void LOCK_HARDWARE(drm_context_t ctx)
-{
- PPTHREAD_MUTEX_LOCK();
- assert(!xvmc_driver->locked);
-
- xvmc_driver->locked = 1;
-}
-
-void UNLOCK_HARDWARE(drm_context_t ctx)
-{
- xvmc_driver->locked = 0;
-
- PPTHREAD_MUTEX_UNLOCK();
-}
-
static int
dri2_connect(Display *display)
{
@@ -340,8 +325,14 @@ _X_EXPORT Status XvMCCreateContext(Display * display, XvPortID port,
return ret;
}
-
+ sigfillset(&xvmc_driver->sa_mask);
+ sigdelset(&xvmc_driver->sa_mask, SIGFPE);
+ sigdelset(&xvmc_driver->sa_mask, SIGILL);
+ sigdelset(&xvmc_driver->sa_mask, SIGSEGV);
+ sigdelset(&xvmc_driver->sa_mask, SIGBUS);
+ sigdelset(&xvmc_driver->sa_mask, SIGKILL);
pthread_mutex_init(&xvmc_driver->ctxmutex, NULL);
+
intel_xvmc_dump_open();
return Success;