aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-04 19:51:38 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-04 19:51:38 +0000
commit1a08d9e31bc6ef28834c7a142ef5396390488246 (patch)
treef616b825b50817c40a44bf99904c22ce68403ff8 /pbx
parenta2c2aa216d65860e8bd3bd92724ffa65fadb5b75 (diff)
Merged revisions 44378 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r44378 | kpfleming | 2006-10-04 14:47:22 -0500 (Wed, 04 Oct 2006) | 4 lines update thread creation code a bit reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44379 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_dundi.c4
-rw-r--r--pbx/pbx_spool.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index e1308306f..241cc5d4d 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -2151,8 +2151,8 @@ static void *process_precache(void *ign)
static int start_network_thread(void)
{
- ast_pthread_create(&netthreadid, NULL, network_thread, NULL);
- ast_pthread_create(&precachethreadid, NULL, process_precache, NULL);
+ ast_pthread_create_background(&netthreadid, NULL, network_thread, NULL);
+ ast_pthread_create_background(&precachethreadid, NULL, process_precache, NULL);
return 0;
}
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index c4714a09d..ec008280b 100644
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -495,7 +495,7 @@ static int load_module(void)
snprintf(qdonedir, sizeof(qdir), "%s/%s", ast_config_AST_SPOOL_DIR, "outgoing_done");
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- if ((ret = ast_pthread_create(&thread,&attr,scan_thread, NULL)) != 0) {
+ if ((ret = ast_pthread_create_background(&thread,&attr,scan_thread, NULL)) != 0) {
ast_log(LOG_WARNING, "Unable to create thread :( (returned error: %d)\n", ret);
return -1;
}