diff options
| author | plunky <plunky@NetBSD.org> | 2008-06-23 12:34:38 +0000 |
|---|---|---|
| committer | plunky <plunky@NetBSD.org> | 2008-06-23 12:34:38 +0000 |
| commit | 3b18cdef88da7c5ec141cb2103997d780ef3cc0a (patch) | |
| tree | 62700a61e1a1de403d0c81b0c34f144a8820241a /sys/dev | |
| parent | aed68d2d63647051b11371aee7de0650316c1873 (diff) | |
hold bt_lock when sending data via sco_send()
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/bluetooth/btsco.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/bluetooth/btsco.c b/sys/dev/bluetooth/btsco.c index 0f1607215c8..a5fe63eccf2 100644 --- a/sys/dev/bluetooth/btsco.c +++ b/sys/dev/bluetooth/btsco.c @@ -1,4 +1,4 @@ -/* $NetBSD: btsco.c,v 1.20 2008/04/24 11:38:36 ad Exp $ */ +/* $NetBSD: btsco.c,v 1.21 2008/06/23 12:34:38 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.20 2008/04/24 11:38:36 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.21 2008/06/23 12:34:38 plunky Exp $"); #include <sys/param.h> #include <sys/audioio.h> @@ -1123,6 +1123,7 @@ btsco_intr(void *arg) sc->sc_tx_block = NULL; sc->sc_tx_size = 0; + mutex_enter(bt_lock); while (size > 0) { MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) @@ -1149,6 +1150,7 @@ btsco_intr(void *arg) block += mlen; size -= mlen; } + mutex_exit(bt_lock); } /* |
