don't unlock the channel in chn_read, msleep will do it for us.
PR: kern/26430
This commit is contained in:
parent
d856af0b1a
commit
cd94939222
@ -380,9 +380,7 @@ chn_read(struct pcm_channel *c, struct uio *buf)
|
|||||||
timeout = (hz * sndbuf_getblksz(bs)) / (sndbuf_getspd(bs) * sndbuf_getbps(bs));
|
timeout = (hz * sndbuf_getblksz(bs)) / (sndbuf_getspd(bs) * sndbuf_getbps(bs));
|
||||||
if (timeout < 1)
|
if (timeout < 1)
|
||||||
timeout = 1;
|
timeout = 1;
|
||||||
CHN_UNLOCK(c);
|
|
||||||
ret = chn_sleep(c, "pcmrd", timeout);
|
ret = chn_sleep(c, "pcmrd", timeout);
|
||||||
CHN_LOCK(c);
|
|
||||||
if (ret == EWOULDBLOCK) {
|
if (ret == EWOULDBLOCK) {
|
||||||
count -= timeout;
|
count -= timeout;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user