mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-09 13:29:59 -05:00
once: make once related variables volatile
This commit is contained in:
parent
66ddeede9e
commit
7f7455b1be
4 changed files with 5 additions and 10 deletions
|
|
@ -29,8 +29,6 @@
|
|||
#include "once.h"
|
||||
|
||||
pa_bool_t pa_once_begin(pa_once *control) {
|
||||
pa_mutex *m;
|
||||
|
||||
pa_assert(control);
|
||||
|
||||
if (pa_atomic_load(&control->done))
|
||||
|
|
@ -43,6 +41,7 @@ pa_bool_t pa_once_begin(pa_once *control) {
|
|||
* executed by us. Hence the awkward locking. */
|
||||
|
||||
for (;;) {
|
||||
pa_mutex *m;
|
||||
|
||||
if ((m = pa_atomic_ptr_load(&control->mutex))) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue