@ -80,7 +80,7 @@
# define AST_PTHREADT_NULL (pthread_t) -1
# define AST_PTHREADT_STOP (pthread_t) -2
# if (defined(SOLARIS) || defined(BSD)) && !defined(__Darwin__)
# if (defined(SOLARIS) || defined(BSD))
# define AST_MUTEX_INIT_W_CONSTRUCTORS
# endif /* SOLARIS || BSD */
@ -283,7 +283,7 @@ static inline int __ast_pthread_mutex_init(int track, const char *filename, int
int res ;
pthread_mutexattr_t attr ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ( ( t - > mutex ) ! = ( ( pthread_mutex_t ) PTHREAD_MUTEX_INITIALIZER ) ) {
/*
@ -319,7 +319,7 @@ static inline int __ast_pthread_mutex_destroy(const char *filename, int lineno,
int res ;
int canlog = strcmp ( filename , " logger.c " ) & t - > track ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ( ( t - > mutex ) = = ( ( pthread_mutex_t ) PTHREAD_MUTEX_INITIALIZER ) ) {
/* Don't try to uninitialize non initialized mutex
* This may no effect on linux
@ -373,7 +373,7 @@ static inline int __ast_pthread_mutex_lock(const char *filename, int lineno, con
int res ;
int canlog = strcmp ( filename , " logger.c " ) & t - > track ;
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS)
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ( ( t - > mutex ) = = ( ( pthread_mutex_t ) PTHREAD_MUTEX_INITIALIZER ) ) {
/* Don't warn abount uninitialized mutex.
* Simple try to initialize it .
@ -461,7 +461,7 @@ static inline int __ast_pthread_mutex_trylock(const char *filename, int lineno,
int res ;
int canlog = strcmp ( filename , " logger.c " ) & t - > track ;
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS)
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ( ( t - > mutex ) = = ( ( pthread_mutex_t ) PTHREAD_MUTEX_INITIALIZER ) ) {
/* Don't warn abount uninitialized mutex.
* Simple try to initialize it .
@ -507,7 +507,7 @@ static inline int __ast_pthread_mutex_unlock(const char *filename, int lineno, c
int res ;
int canlog = strcmp ( filename , " logger.c " ) & t - > track ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ( ( t - > mutex ) = = ( ( pthread_mutex_t ) PTHREAD_MUTEX_INITIALIZER ) ) {
__ast_mutex_logger ( " %s line %d (%s): Error: mutex '%s' is uninitialized. \n " ,
filename , lineno , func , mutex_name ) ;
@ -586,7 +586,7 @@ static inline int __ast_cond_wait(const char *filename, int lineno, const char *
int res ;
int canlog = strcmp ( filename , " logger.c " ) & t - > track ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ( ( t - > mutex ) = = ( ( pthread_mutex_t ) PTHREAD_MUTEX_INITIALIZER ) ) {
__ast_mutex_logger ( " %s line %d (%s): Error: mutex '%s' is uninitialized. \n " ,
filename , lineno , func , mutex_name ) ;
@ -657,7 +657,7 @@ static inline int __ast_cond_timedwait(const char *filename, int lineno, const c
int res ;
int canlog = strcmp ( filename , " logger.c " ) & t - > track ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ( ( t - > mutex ) = = ( ( pthread_mutex_t ) PTHREAD_MUTEX_INITIALIZER ) ) {
__ast_mutex_logger ( " %s line %d (%s): Error: mutex '%s' is uninitialized. \n " ,
filename , lineno , func , mutex_name ) ;
@ -893,8 +893,8 @@ static inline int __ast_rwlock_init(const char *filename, int lineno, const char
{
int res ;
pthread_rwlockattr_t attr ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
int canlog = strcmp ( filename , " logger.c " ) ;
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp ( filename , " logger.c " ) ;
if ( * prwlock ! = ( ( ast_rwlock_t ) AST_RWLOCK_INIT_VALUE ) ) {
__ast_mutex_logger ( " %s line %d (%s): Warning: rwlock '%s' is already initialized. \n " ,
@ -919,7 +919,7 @@ static inline int __ast_rwlock_destroy(const char *filename, int lineno, const c
int res ;
int canlog = strcmp ( filename , " logger.c " ) ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ( * prwlock = = ( ( ast_rwlock_t ) AST_RWLOCK_INIT_VALUE ) ) {
__ast_mutex_logger ( " %s line %d (%s): Warning: rwlock '%s' is uninitialized. \n " ,
filename , lineno , func , rwlock_name ) ;
@ -939,7 +939,7 @@ static inline int _ast_rwlock_unlock(ast_rwlock_t *lock, const char *name,
const char * file , int line , const char * func )
{
int res ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp ( file , " logger.c " ) ;
if ( * lock = = ( ( ast_rwlock_t ) AST_RWLOCK_INIT_VALUE ) ) {
@ -964,7 +964,7 @@ static inline int _ast_rwlock_rdlock(ast_rwlock_t *lock, const char *name,
const char * file , int line , const char * func )
{
int res ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp ( file , " logger.c " ) ;
if ( * lock = = ( ( ast_rwlock_t ) AST_RWLOCK_INIT_VALUE ) ) {
@ -995,7 +995,7 @@ static inline int _ast_rwlock_wrlock(ast_rwlock_t *lock, const char *name,
const char * file , int line , const char * func )
{
int res ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp ( file , " logger.c " ) ;
if ( * lock = = ( ( ast_rwlock_t ) AST_RWLOCK_INIT_VALUE ) ) {
@ -1025,7 +1025,7 @@ static inline int _ast_rwlock_timedrdlock(ast_rwlock_t *lock, const char *name,
struct timespec * abs_timeout , const char * file , int line , const char * func )
{
int res ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp ( file , " logger.c " ) ;
if ( * lock = = ( ( ast_rwlock_t ) AST_RWLOCK_INIT_VALUE ) ) {
@ -1071,7 +1071,7 @@ static inline int _ast_rwlock_timedwrlock(ast_rwlock_t *lock, const char *name,
struct timespec * abs_timeout , const char * file , int line , const char * func )
{
int res ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp ( file , " logger.c " ) ;
if ( * lock = = ( ( ast_rwlock_t ) AST_RWLOCK_INIT_VALUE ) ) {
@ -1117,7 +1117,7 @@ static inline int _ast_rwlock_tryrdlock(ast_rwlock_t *lock, const char *name,
const char * file , int line , const char * func )
{
int res ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp ( file , " logger.c " ) ;
if ( * lock = = ( ( ast_rwlock_t ) AST_RWLOCK_INIT_VALUE ) ) {
@ -1148,7 +1148,7 @@ static inline int _ast_rwlock_trywrlock(ast_rwlock_t *lock, const char *name,
const char * file , int line , const char * func )
{
int res ;
# if def AST_MUTEX_INIT_W_CONSTRUCTORS
# if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp ( file , " logger.c " ) ;
if ( * lock = = ( ( ast_rwlock_t ) AST_RWLOCK_INIT_VALUE ) ) {