diff options
| author | Julian Elischer <julian@FreeBSD.org> | 2004-12-16 23:19:57 +0000 |
|---|---|---|
| committer | Julian Elischer <julian@FreeBSD.org> | 2004-12-16 23:19:57 +0000 |
| commit | b7ad4d221a6a38f9d25d442ca2196a6210280c3b (patch) | |
| tree | 5bf0bb14e589dd53f38f59e460e788ecd06ae786 /sys/dev/bktr | |
| parent | af952b363b6d24a41af2e49dda4e0886e7857b87 (diff) | |
Notes
Diffstat (limited to 'sys/dev/bktr')
| -rw-r--r-- | sys/dev/bktr/msp34xx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/bktr/msp34xx.c b/sys/dev/bktr/msp34xx.c index d328613f06e2..940205ac4af8 100644 --- a/sys/dev/bktr/msp34xx.c +++ b/sys/dev/bktr/msp34xx.c @@ -706,6 +706,7 @@ static void msp3400c_thread(void *data) dprintk("msp3400: thread started\n"); + mtx_lock(&Giant); for (;;) { if (msp->rmmod) goto done; @@ -896,6 +897,7 @@ done: msp->kthread = NULL; wakeup(&msp->kthread); + mtx_unlock(&Giant); kthread_exit(0); } @@ -940,6 +942,7 @@ static void msp3410d_thread(void *data) dprintk("msp3410: thread started\n"); + mtx_lock(&Giant); for (;;) { if (msp->rmmod) goto done; @@ -1121,6 +1124,7 @@ done: msp->kthread = NULL; wakeup(&msp->kthread); + mtx_unlock(&Giant); kthread_exit(0); } @@ -1217,12 +1221,14 @@ int msp_detach(bktr_ptr_t client) if (msp->kthread) { /* XXX mutex lock required */ + mtx_lock(&Giant); msp->rmmod = 1; msp->watch_stereo = 0; wakeup(msp->kthread); while (msp->kthread) tsleep(&msp->kthread, PRIBIO, "wait for kthread", hz/10); + mtx_unlock(&Giant); } if (client->msp3400c_info != NULL) { |
