summaryrefslogtreecommitdiff
path: root/include/asterisk/utils.h
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-05-24 18:30:19 +0000
committerRussell Bryant <russell@russellbryant.com>2007-05-24 18:30:19 +0000
commit4b3a3fb14c298512ef69e17a710e210de14914fb (patch)
tree86895556d8f221a39105f4398a54d612fbbd3da8 /include/asterisk/utils.h
parentbcd2bd8294408ca2f432747ef2e3073edecec4c1 (diff)
Add a new API call for creating detached threads. Then, go replace all of the
places in the code where the same block of code for creating detached threads was replicated. (patch from bbryant) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/utils.h')
-rw-r--r--include/asterisk/utils.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 5c68a2773..4b523da98 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -291,16 +291,29 @@ int ast_pthread_create_stack(pthread_t *thread, pthread_attr_t *attr, void *(*st
void *data, size_t stacksize, const char *file, const char *caller,
int line, const char *start_fn);
+int ast_pthread_create_detached_stack(pthread_t *thread, pthread_attr_t *attr, void*(*start_routine)(void *),
+ void *data, size_t stacksize, const char *file, const char *caller,
+ int line, const char *start_fn);
+
#define ast_pthread_create(a, b, c, d) ast_pthread_create_stack(a, b, c, d, \
0, \
__FILE__, __FUNCTION__, \
__LINE__, #c)
+#define ast_pthread_create_detached(a, b, c, d) ast_pthread_create_detached_stack(a, b, c, d, \
+ 0, \
+ __FILE__, __FUNCTION__, \
+ __LINE__, #c)
#define ast_pthread_create_background(a, b, c, d) ast_pthread_create_stack(a, b, c, d, \
AST_BACKGROUND_STACKSIZE, \
__FILE__, __FUNCTION__, \
__LINE__, #c)
+#define ast_pthread_create_detached_background(a, b, c, d) ast_pthread_create_detached_stack(a, b, c, d, \
+ AST_BACKGROUND_STACKSIZE, \
+ __FILE__, __FUNCTION__, \
+ __LINE__, #c)
+
/*!
\brief Process a string to find and replace characters
\param start The string to analyze