[svn-commits] dhubbard: trunk r115268 - in /trunk: include/asterisk/ main/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri May 2 22:40:33 CDT 2008
Author: dhubbard
Date: Fri May 2 22:40:32 2008
New Revision: 115268
URL: http://svn.digium.com/view/asterisk?view=rev&rev=115268
Log:
A taskprocessor is an object that has a name, a task queue, and an event processing thread. Modules reference a taskprocessor, push tasks into the taskprocessor as needed, and unreference the taskprocessor when the taskprocessor is no longer needed.
A task wraps a callback function pointer and a data pointer and is managed internal to the taskprocessor subsystem. The callback function is responsible for releasing task data.
Taskprocessor API
* ast_taskprocessor_get(..) - returns a reference to a taskprocessor
* ast_taskprocessor_unreference(..) - releases reference to a taskprocessor
* ast_taskprocessor_push(..) - push a task into a taskprocessor queue
Check doxygen for more details
Added:
trunk/include/asterisk/taskprocessor.h
- copied unchanged from r115267, team/group/taskprocessors/include/asterisk/taskprocessor.h
trunk/main/taskprocessor.c
- copied unchanged from r115267, team/group/taskprocessors/main/taskprocessor.c
Modified:
trunk/include/asterisk/_private.h
trunk/main/Makefile
trunk/main/asterisk.c
Modified: trunk/include/asterisk/_private.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/_private.h?view=diff&rev=115268&r1=115267&r2=115268
==============================================================================
--- trunk/include/asterisk/_private.h (original)
+++ trunk/include/asterisk/_private.h Fri May 2 22:40:32 2008
@@ -36,6 +36,7 @@
void ast_autoservice_init(void); /*!< Provided by autoservice.c */
int ast_http_init(void); /*!< Provided by http.c */
int ast_http_reload(void); /*!< Provided by http.c */
+int ast_tps_init(void); /*!< Provided by taskprocessor.c */
/*!
* \brief Reload asterisk modules.
Modified: trunk/main/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/main/Makefile?view=diff&rev=115268&r1=115267&r2=115268
==============================================================================
--- trunk/main/Makefile (original)
+++ trunk/main/Makefile Fri May 2 22:40:32 2008
@@ -30,7 +30,7 @@
cryptostub.o sha1.o http.o fixedjitterbuf.o abstract_jb.o \
strcompat.o threadstorage.o dial.o event.o adsistub.o audiohook.o \
astobj2.o hashtab.o global_datastores.o $(RESAMPLE_OBJS) version.o \
- features.o
+ features.o taskprocessor.o
# we need to link in the objects statically, not as a library, because
# otherwise modules will not have them available if none of the static
Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=115268&r1=115267&r2=115268
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Fri May 2 22:40:32 2008
@@ -2815,6 +2815,7 @@
ast_builtins_init();
ast_utils_init();
tdd_init();
+ ast_tps_init();
if (getenv("HOME"))
snprintf(filename, sizeof(filename), "%s/.asterisk_history", getenv("HOME"));
More information about the svn-commits
mailing list