diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2006-10-04 21:10:36 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2006-10-04 21:10:36 +0000 |
commit | c28461197b8d8800e3dee1c3be428f7b3acccad8 (patch) | |
tree | 721970aca00f7453f328d7fafbb75d090b1ef309 /main/utils.c | |
parent | 3c876af5cf3a9bd6030842b2bb2eee6917f91cd3 (diff) |
Merged revisions 44390 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r44390 | kpfleming | 2006-10-04 16:04:21 -0500 (Wed, 04 Oct 2006) | 2 lines
make LOW_MEMORY builds actually work
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/utils.c')
-rw-r--r-- | main/utils.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/utils.c b/main/utils.c index 3f44fe777..6ba136ed6 100644 --- a/main/utils.c +++ b/main/utils.c @@ -509,6 +509,7 @@ int ast_utils_init(void) #undef pthread_create /* For ast_pthread_create function only */ #endif /* !__linux__ */ +#if !defined(LOW_MEMORY) /* * support for 'show threads'. The start routine is wrapped by * dummy_start(), so that ast_register_thread() and @@ -546,11 +547,15 @@ static void *dummy_start(void *data) return ret; } +#endif /* !LOW_MEMORY */ + int ast_pthread_create_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) { +#if !defined(LOW_MEMORY) struct thr_arg *a; +#endif if (!attr) { attr = alloca(sizeof(*attr)); @@ -575,6 +580,7 @@ int ast_pthread_create_stack(pthread_t *thread, pthread_attr_t *attr, void *(*st if ((errno = pthread_attr_setstacksize(attr, stacksize ? stacksize : AST_STACKSIZE))) ast_log(LOG_WARNING, "pthread_attr_setstacksize: %s\n", strerror(errno)); +#if !defined(LOW_MEMORY) if ((a = ast_malloc(sizeof(*a)))) { a->start_routine = start_routine; a->data = data; @@ -583,6 +589,7 @@ int ast_pthread_create_stack(pthread_t *thread, pthread_attr_t *attr, void *(*st start_fn, line, file, caller); data = a; } +#endif /* !LOW_MEMORY */ return pthread_create(thread, attr, start_routine, data); /* We're in ast_pthread_create, so it's okay */ } |