From 9b8e0a5afe9cba0fd430e9642630bd465db9aefa Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 21 Feb 2013 11:18:36 +0000 Subject: Fixed #1616: Implementation of Group lock and other foundation in PJLIB for fixing synchronization issues git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4359 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/ioqueue.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pjlib/include/pj/ioqueue.h') diff --git a/pjlib/include/pj/ioqueue.h b/pjlib/include/pj/ioqueue.h index 40bb403c..1e983327 100644 --- a/pjlib/include/pj/ioqueue.h +++ b/pjlib/include/pj/ioqueue.h @@ -404,6 +404,19 @@ PJ_DECL(pj_status_t) pj_ioqueue_register_sock( pj_pool_t *pool, const pj_ioqueue_callback *cb, pj_ioqueue_key_t **key ); +/** + * Variant of pj_ioqueue_register_sock() with additional group lock parameter. + * If group lock is set for the key, the key will add the reference counter + * when the socket is registered and decrease it when it is destroyed. + */ +PJ_DECL(pj_status_t) pj_ioqueue_register_sock2(pj_pool_t *pool, + pj_ioqueue_t *ioque, + pj_sock_t sock, + pj_grp_lock_t *grp_lock, + void *user_data, + const pj_ioqueue_callback *cb, + pj_ioqueue_key_t **key ); + /** * Unregister from the I/O Queue framework. Caller must make sure that * the key doesn't have any pending operations before calling this function, -- cgit v1.2.3