Skip to content
Snippets Groups Projects
Commit adf8c8de authored by Olle Johansson's avatar Olle Johansson
Browse files

- Change AST_INLINE_AP to AST_INLINE_API for non-386 systems :-)

- Doxygen changes


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 7dbeaa4e
No related branches found
No related tags found
No related merge requests found
...@@ -21,12 +21,14 @@ ...@@ -21,12 +21,14 @@
* *
* - See \ref LockDef * - See \ref LockDef
*/ */
/* \page LockDef Asterisk thread locking models /* \page LockDef Asterisk thread locking models
* *
* This file provides several different implementation of the functions, * This file provides several different implementation of the functions,
* depending on the platform, the use of DEBUG_THREADS, and the way * depending on the platform, the use of DEBUG_THREADS, and the way
* global mutexes are initialized. * global mutexes are initialized.
* At the moment, we have 3 ways to initialize global mutexes, depending on *
* \par At the moment, we have 3 ways to initialize global mutexes, depending on
* *
* - \b static: the mutex is assigned the value AST_MUTEX_INIT_VALUE * - \b static: the mutex is assigned the value AST_MUTEX_INIT_VALUE
* this is done at compile time, and is the way used on Linux. * this is done at compile time, and is the way used on Linux.
...@@ -212,7 +214,7 @@ static inline int __ast_pthread_mutex_destroy(const char *filename, int lineno, ...@@ -212,7 +214,7 @@ static inline int __ast_pthread_mutex_destroy(const char *filename, int lineno,
} }
#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) #if defined(AST_MUTEX_INIT_W_CONSTRUCTORS)
/* if AST_MUTEX_INIT_W_CONSTRUCTORS is defined, use file scope /*! \brief if AST_MUTEX_INIT_W_CONSTRUCTORS is defined, use file scope
constrictors/destructors to create/destroy mutexes. */ constrictors/destructors to create/destroy mutexes. */
#define __AST_MUTEX_DEFINE(scope,mutex) \ #define __AST_MUTEX_DEFINE(scope,mutex) \
scope ast_mutex_t mutex = AST_MUTEX_INIT_VALUE; \ scope ast_mutex_t mutex = AST_MUTEX_INIT_VALUE; \
...@@ -225,11 +227,13 @@ static void __attribute__ ((destructor)) fini_##mutex(void) \ ...@@ -225,11 +227,13 @@ static void __attribute__ ((destructor)) fini_##mutex(void) \
ast_mutex_destroy(&mutex); \ ast_mutex_destroy(&mutex); \
} }
#elif defined(AST_MUTEX_INIT_ON_FIRST_USE) #elif defined(AST_MUTEX_INIT_ON_FIRST_USE)
/* if AST_MUTEX_INIT_ON_FIRST_USE is defined, mutexes are created on /*! \note
if AST_MUTEX_INIT_ON_FIRST_USE is defined, mutexes are created on
first use. The performance impact on FreeBSD should be small since first use. The performance impact on FreeBSD should be small since
the pthreads library does this itself to initialize errror checking the pthreads library does this itself to initialize errror checking
(defaulty type) mutexes. If nither is defined, the pthreads librariy (defaulty type) mutexes. If nither is defined, the pthreads librariy
does the initialization itself on first use. */ does the initialization itself on first use.
*/
#define __AST_MUTEX_DEFINE(scope,mutex) \ #define __AST_MUTEX_DEFINE(scope,mutex) \
scope ast_mutex_t mutex = AST_MUTEX_INIT_VALUE scope ast_mutex_t mutex = AST_MUTEX_INIT_VALUE
#else /* AST_MUTEX_INIT_W_CONSTRUCTORS */ #else /* AST_MUTEX_INIT_W_CONSTRUCTORS */
...@@ -709,7 +713,7 @@ AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v), ...@@ -709,7 +713,7 @@ AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
return (v); return (v);
}) })
#else /* low performance version in utils.c */ #else /* low performance version in utils.c */
AST_INLINE_AP(int ast_atomic_fetchadd_int(volatile int *p, int v), AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
{ {
return ast_atomic_fetchadd_int_slow(p, v); return ast_atomic_fetchadd_int_slow(p, v);
}) })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment