]> git.tuebingen.mpg.de Git - paraslash.git/commit
ao_write: Simplify locking.
authorAndre Noll <maan@systemlinux.org>
Sun, 9 Mar 2014 12:23:56 +0000 (13:23 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 6 Apr 2014 06:53:26 +0000 (08:53 +0200)
commit75058bfb5bd14d2eb540bff62009ad54e5b03ba0
treea0ec282feff44ee7536b094b05e8b0d6b3147e88
parentbc4fabf9e706f28897ab5c1068a97564f3378750
ao_write: Simplify locking.

Currently we lock the mutex at the beginnint of each iteration
of the main loop of aow_play() and drop the lock before calling
ao_play(). On errors we leave the loop either with the mutex locked
locked or unlocked, depending on the error condition that caused us
to break out of the loop.

This is unnecessarily complex. This patch simplifies the locking
by always leave the loop with the mutex locked.
ao_write.c