diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/pulsecore/flist.h | 4 | ||||
| -rw-r--r-- | src/pulsecore/once-posix.c | 2 | ||||
| -rw-r--r-- | src/pulsecore/once.h | 8 | 
3 files changed, 7 insertions, 7 deletions
| diff --git a/src/pulsecore/flist.h b/src/pulsecore/flist.h index 177edd6a..69b9c741 100644 --- a/src/pulsecore/flist.h +++ b/src/pulsecore/flist.h @@ -47,13 +47,13 @@ void* pa_flist_pop(pa_flist*l);  #define PA_STATIC_FLIST_DECLARE(name, size, destroy_cb)                 \      static struct {                                                     \          pa_flist *flist;                                                \ -        pa_once_t once;                                                 \ +        pa_once once;                                                   \      } name##_static_flist = { NULL, PA_ONCE_INIT };                     \      static void name##_init(void) {                                     \          name##_static_flist.flist = pa_flist_new(size);                 \      }                                                                   \      static inline pa_flist* name##_get(void) {                          \ -        pa_once(&name##_static_flist.once, name##_init);                \ +        pa_run_once(&name##_static_flist.once, name##_init);            \          return name##_static_flist.flist;                               \      }                                                                   \      static void name##_destructor(void) PA_GCC_DESTRUCTOR;              \ diff --git a/src/pulsecore/once-posix.c b/src/pulsecore/once-posix.c index 25ccb035..fd6288fe 100644 --- a/src/pulsecore/once-posix.c +++ b/src/pulsecore/once-posix.c @@ -33,7 +33,7 @@  #include "once.h"  /* Not reentrant -- how could it be? */ -void pa_once(pa_once_t *control, pa_once_func_t func) { +void pa_run_once(pa_once *control, pa_once_func_t func) {      pa_mutex *m;      pa_assert(control); diff --git a/src/pulsecore/once.h b/src/pulsecore/once.h index b2602121..d9372d86 100644 --- a/src/pulsecore/once.h +++ b/src/pulsecore/once.h @@ -30,17 +30,17 @@  typedef struct pa_once {      pa_atomic_ptr_t mutex;      pa_atomic_t ref, done; -} pa_once_t; +} pa_once;  #define PA_ONCE_INIT                                                    \      {                                                                   \          .mutex = PA_ATOMIC_PTR_INIT(NULL),                              \ -        .ref = PA_ATOMIC_INIT(0),                                   \ -        .done = PA_ATOMIC_INIT(0)                                   \ +        .ref = PA_ATOMIC_INIT(0),                                       \ +        .done = PA_ATOMIC_INIT(0)                                       \      }  typedef void (*pa_once_func_t) (void); -void pa_once(pa_once_t *o, pa_once_func_t f); +void pa_run_once(pa_once *o, pa_once_func_t f);  #endif | 
