svn commit: r339582 - head/sys/dev/sound/midi
Hans Petter Selasky
hps at selasky.org
Mon Oct 22 10:27:20 UTC 2018
On 10/22/18 12:20 PM, Konstantin Belousov wrote:
> Then why do you need to re-acquire the mutex after uiomove ?
Hi,
Because the code is factored this way:
mtx_lock();
while (uio->uio_resid > 0) {
do state checks()
mtx_unlock();
retval = uiomove();
mtx_lock();
}
mtx_unlock();
Yes, you're right the last mtx_lock() can be optimised away. I'm leaving
that to somebody else. This code typically is processing MIDI events at
very slow rates like 8KBytes/s and does not need to be very fast.
--HPS
More information about the svn-src-all
mailing list