summaryrefslogtreecommitdiff
path: root/include/asterisk/utils.h
diff options
context:
space:
mode:
authorLuigi Rizzo <rizzo@icir.org>2007-11-16 22:37:17 +0000
committerLuigi Rizzo <rizzo@icir.org>2007-11-16 22:37:17 +0000
commit1f6dcae00736f97c06ed0af15c30736f8c7127a1 (patch)
treed2d8a0b833728b7b661676d995db309cb250275c /include/asterisk/utils.h
parentb6bd9155f30c8e59c085dca993eecbf9911c0a9c (diff)
whitespace only change - adjust indentation and add some
comments on the content of these two files. utils.h (which is included in over 150 files) contains a lot of unrelated functions which require the inclusion of a large number of other headers. At some point we should partition its content in a better way. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/utils.h')
-rw-r--r--include/asterisk/utils.h41
1 files changed, 23 insertions, 18 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index c1b61ba2b..c79cc8d0b 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -353,6 +353,10 @@ static force_inline int inaddrcmp(const struct sockaddr_in *sin1, const struct s
|| (sin1->sin_port != sin2->sin_port));
}
+/*
+ * Thread management support (should be moved to lock.h or a different header)
+ */
+
#define AST_STACKSIZE 240 * 1024
#if defined(LOW_MEMORY)
@@ -372,24 +376,25 @@ int ast_pthread_create_detached_stack(pthread_t *thread, pthread_attr_t *attr, v
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)
+#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)
+
+/* End of thread management support */
/*!
\brief Process a string to find and replace characters