mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user