diff --git a/src/pulsecore/asyncmsgq.c b/src/pulsecore/asyncmsgq.c index c176bd0eb085fa3e70f7bde692906bafdf1b9f9e..2efff652cc5fb6b056e832410ba2890850260317 100644 --- a/src/pulsecore/asyncmsgq.c +++ b/src/pulsecore/asyncmsgq.c @@ -40,26 +40,6 @@ PA_STATIC_FLIST_DECLARE(asyncmsgq, 0, pa_xfree); PA_STATIC_FLIST_DECLARE(semaphores, 0, (void(*)(void*)) pa_semaphore_free); -struct asyncmsgq_item { - int code; - pa_msgobject *object; - void *userdata; - pa_free_cb_t free_cb; - int64_t offset; - pa_memchunk memchunk; - pa_semaphore *semaphore; - int ret; -}; - -struct pa_asyncmsgq { - PA_REFCNT_DECLARE; - pa_asyncq *asyncq; - pa_mutex *mutex; /* only for the writer side */ - uint32_t mark; - - struct asyncmsgq_item *current; -}; - pa_asyncmsgq *pa_asyncmsgq_new(unsigned size) { pa_asyncq *asyncq; pa_asyncmsgq *a; diff --git a/src/pulsecore/asyncmsgq.h b/src/pulsecore/asyncmsgq.h index 367ccac29185160b8d77655946ba737c688b9d7a..0d63ccda080e7bc78754abfbb13e93ee0d819501 100644 --- a/src/pulsecore/asyncmsgq.h +++ b/src/pulsecore/asyncmsgq.h @@ -25,6 +25,7 @@ #include #include #include +#include /* A simple asynchronous message queue, based on pa_asyncq. In * contrast to pa_asyncq this one is multiple-writer safe, though @@ -48,6 +49,26 @@ enum { PA_MESSAGE_SHUTDOWN = -1/* A generic message to inform the handler of this queue to quit */ }; +struct asyncmsgq_item { + int code; + pa_msgobject *object; + void *userdata; + pa_free_cb_t free_cb; + int64_t offset; + pa_memchunk memchunk; + pa_semaphore *semaphore; + int ret; +}; + +struct pa_asyncmsgq { + PA_REFCNT_DECLARE; + pa_asyncq *asyncq; + pa_mutex *mutex; /* only for the writer side */ + uint32_t mark; + + struct asyncmsgq_item *current; +}; + typedef struct pa_asyncmsgq pa_asyncmsgq; pa_asyncmsgq* pa_asyncmsgq_new(unsigned size);