mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-17 16:10:29 +00:00
Prevent some data race conditions (pointed out by Coverity)
This commit is contained in:
parent
46872f8fcb
commit
8a71830d44
@ -81,8 +81,8 @@ static void audio_thread_loop(void *data)
|
||||
if (!thr->alive)
|
||||
{
|
||||
scond_signal(thr->cond);
|
||||
slock_unlock(thr->lock);
|
||||
thr->stopped_ack = true;
|
||||
slock_unlock(thr->lock);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,9 @@ static void alsa_thread_free(void *data)
|
||||
{
|
||||
if (alsa->worker_thread)
|
||||
{
|
||||
slock_lock(alsa->cond_lock);
|
||||
alsa->thread_dead = true;
|
||||
slock_unlock(alsa->cond_lock);
|
||||
sthread_join(alsa->worker_thread);
|
||||
}
|
||||
if (alsa->buffer)
|
||||
|
Loading…
x
Reference in New Issue
Block a user