From 967e380ba88bf99bafe2922cf0a1fbf5f3d19192 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Tue, 15 Jan 2013 21:09:55 +0000 Subject: Make the threadpool listener opaque. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379126 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/threadpool.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/asterisk/threadpool.h b/include/asterisk/threadpool.h index f003ace1f..51abc63c4 100644 --- a/include/asterisk/threadpool.h +++ b/include/asterisk/threadpool.h @@ -67,20 +67,6 @@ struct ast_threadpool_listener_callbacks { void (*shutdown)(struct ast_threadpool_listener *listener); }; -/*! - * \brief listener for a threadpool - * - * The listener is notified of changes in a threadpool. It can - * react by doing things like increasing the number of threads - * in the pool - */ -struct ast_threadpool_listener { - /*! Callbacks called by the threadpool */ - const struct ast_threadpool_listener_callbacks *callbacks; - /*! User data for the listener */ - void *user_data; -}; - struct ast_threadpool_options { #define AST_THREADPOOL_OPTIONS_VERSION 1 /*! Version of thradpool options in use */ @@ -128,6 +114,8 @@ struct ast_threadpool_options { struct ast_threadpool_listener *ast_threadpool_listener_alloc( const struct ast_threadpool_listener_callbacks *callbacks, void *user_data); +void *ast_threadpool_listener_get_user_data(const struct ast_threadpool_listener *listener); + /*! * \brief Create a new threadpool * -- cgit v1.2.3