From c1c59b4675d1c6912badc3f93fbc5d9ccecb7610 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 11 Aug 2007 16:01:25 +0000 Subject: 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 --- src/pulsecore/asyncmsgq.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/pulsecore/asyncmsgq.h') 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); -- cgit