aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-08 17:15:02 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-08 17:15:02 +0000
commit28a366ed7268db8428ee2d78fb44f29c78067dd9 (patch)
treee2443cc3c4c3b09b706e611a61f475c509778c57 /include
parentd85f0f5c24a90dab01664373615a8e243e6f5851 (diff)
Merge BSD stack size work (bug #2067)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3596 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-xinclude/asterisk/agi.h3
-rwxr-xr-xinclude/asterisk/lock.h1
-rwxr-xr-xinclude/asterisk/utils.h12
3 files changed, 15 insertions, 1 deletions
diff --git a/include/asterisk/agi.h b/include/asterisk/agi.h
index 25899d58c..a488dfb26 100755
--- a/include/asterisk/agi.h
+++ b/include/asterisk/agi.h
@@ -37,7 +37,8 @@ typedef struct agi_command {
struct agi_command *next;
} agi_command;
-
+int agi_register(agi_command *cmd);
+void agi_unregister(agi_command *cmd);
#if defined(__cplusplus) || defined(c_plusplus)
}
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h
index 7d92a727e..059bc89c6 100755
--- a/include/asterisk/lock.h
+++ b/include/asterisk/lock.h
@@ -357,5 +357,6 @@ static inline int ast_mutex_trylock(ast_mutex_t *pmutex)
#define AST_MUTEX_INITIALIZER __use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__
#define gethostbyname __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__
+#define pthread_create __use_ast_pthread_create_instead__
#endif
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 9a3b57329..93f99432a 100755
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -12,7 +12,9 @@
#ifndef _ASTERISK_UTIL_H
#define _ASTERISK_UTIL_H
+#include <netinet/in.h>
#include <netdb.h>
+#include <pthread.h>
static inline int ast_strlen_zero(const char *s)
{
@@ -37,4 +39,14 @@ extern int ast_utils_init(void);
#endif
#define inet_ntoa __dont__use__inet_ntoa__use__ast_inet_ntoa__instead__
+#ifdef LINUX
+#define ast_pthread_create pthread_create
+#else
+/* Linux threads have a default 2MB stack size. */
+#ifndef PTHREAD_ATTR_STACKSIZE
+#define PTHREAD_ATTR_STACKSIZE 2097152
+#endif /* PTHREAD_ATTR_STACKSIZE */
+extern int ast_pthread_create(pthread_t *thread, pthread_attr_t *attr, void *(*start_routine)(void *), void *data);
+#endif /* LINUX */
+
#endif