summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-02-22 18:12:24 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-02-22 18:13:22 +0000
commitbfef9916124973b5e08f9b32eb1fcfb400ee4e8b (patch)
tree26706a743f9bd3d97fb924a204c70ddcb9a06d97 /src/sna
parent64fc1bb9c87e95ff484ecd11f391b1c0d556d584 (diff)
sna: Propagate thread signals for extra DBG
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/sna_threads.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/sna_threads.c b/src/sna/sna_threads.c
index eac69640..089d8ab7 100644
--- a/src/sna/sna_threads.c
+++ b/src/sna/sna_threads.c
@@ -187,9 +187,11 @@ void sna_threads_trap(int sig)
for (n = 1; threads[n].thread != t; n++)
;
+ ERR(("%s: thread[%d] caught signal %d\n", __func__, n, sig));
+
pthread_mutex_lock(&threads[n].mutex);
threads[n].func = NULL;
- threads[n].arg = &threads[n];
+ threads[n].arg = (void *)(intptr_t)sig;
pthread_cond_signal(&threads[n].cond);
pthread_mutex_unlock(&threads[n].mutex);
@@ -212,7 +214,7 @@ void sna_threads_wait(void)
}
if (threads[n].arg != NULL) {
- ERR(("%s: thread %d died\n", __func__, n));
+ DBG(("%s: thread[%d] died from signal %d\n", __func__, n, (int)threads[n].arg));
sna_threads_kill();
return;
}