diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-08-11 16:01:25 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-08-11 16:01:25 +0000 |
commit | c1c59b4675d1c6912badc3f93fbc5d9ccecb7610 (patch) | |
tree | 2bbef3028099b2878f50768a73b8978039edf10e /src/pulsecore/asyncmsgq.h | |
parent | f7b707b9541fa2e5e7a709ccb3f26c0be11bc6a9 (diff) |
add proper refcounting to pa_asyncmsgq objects, to allow destruction from the dispatched callbacks
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1635 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/asyncmsgq.h')
-rw-r--r-- | src/pulsecore/asyncmsgq.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pulsecore/asyncmsgq.h b/src/pulsecore/asyncmsgq.h index b0f1a6e4..2f188376 100644 --- a/src/pulsecore/asyncmsgq.h +++ b/src/pulsecore/asyncmsgq.h @@ -49,13 +49,14 @@ * latter waits for completion, synchronously. */ enum { - PA_MESSAGE_SHUTDOWN /* A generic message to inform the handler of this queue to quit */ + PA_MESSAGE_SHUTDOWN = -1/* A generic message to inform the handler of this queue to quit */ }; typedef struct pa_asyncmsgq pa_asyncmsgq; pa_asyncmsgq* pa_asyncmsgq_new(size_t size); -void pa_asyncmsgq_free(pa_asyncmsgq* q); +pa_asyncmsgq* pa_asyncmsgq_ref(pa_asyncmsgq *q); +void pa_asyncmsgq_unref(pa_asyncmsgq* q); void pa_asyncmsgq_post(pa_asyncmsgq *q, pa_msgobject *object, int code, const void *userdata, int64_t offset, const pa_memchunk *memchunk, pa_free_cb_t userdata_free_cb); int pa_asyncmsgq_send(pa_asyncmsgq *q, pa_msgobject *object, int code, const void *userdata, int64_t offset, const pa_memchunk *memchunk); |