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: https://origsvn.digium.com/svn/asterisk/trunk@44379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2006-10-04 19:51:38 +00:00
parent de7a85105a
commit 3c876af5cf
27 changed files with 83 additions and 63 deletions

View File

@@ -4331,7 +4331,7 @@ static int restart_monitor(void)
pthread_kill(monitor_thread, SIGURG);
} else {
/* Start a new monitor */
if (ast_pthread_create(&monitor_thread, NULL, do_monitor, NULL) < 0) {
if (ast_pthread_create_background(&monitor_thread, NULL, do_monitor, NULL) < 0) {
ast_mutex_unlock(&monlock);
ast_log(LOG_ERROR, "Unable to start monitor thread.\n");
return -1;
@@ -4512,7 +4512,7 @@ static int reload_config(void)
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Skinny listening on %s:%d\n",
ast_inet_ntoa(bindaddr.sin_addr), ntohs(bindaddr.sin_port));
ast_pthread_create(&accept_t,NULL, accept_thread, NULL);
ast_pthread_create_background(&accept_t,NULL, accept_thread, NULL);
}
}
ast_mutex_unlock(&netlock);