summaryrefslogtreecommitdiff
path: root/comms/asterisk/patches/patch-include_asterisk_lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'comms/asterisk/patches/patch-include_asterisk_lock.h')
-rw-r--r--comms/asterisk/patches/patch-include_asterisk_lock.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/comms/asterisk/patches/patch-include_asterisk_lock.h b/comms/asterisk/patches/patch-include_asterisk_lock.h
index 800ae2a62c0..927a050e34f 100644
--- a/comms/asterisk/patches/patch-include_asterisk_lock.h
+++ b/comms/asterisk/patches/patch-include_asterisk_lock.h
@@ -1,8 +1,26 @@
-$NetBSD: patch-include_asterisk_lock.h,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
+$NetBSD: patch-include_asterisk_lock.h,v 1.2 2013/06/14 04:26:55 jnemeth Exp $
---- include/asterisk/lock.h.orig 2011-01-31 07:52:48.000000000 +0000
+--- include/asterisk/lock.h.orig 2012-11-22 23:58:08.000000000 +0000
+++ include/asterisk/lock.h
-@@ -569,7 +569,7 @@ static void __attribute__((destructor))
+@@ -561,6 +561,17 @@ static void __attribute__((destructor))
+ #define AST_RWLOCK_DEFINE_STATIC(rwlock) __AST_RWLOCK_DEFINE(static, rwlock, AST_RWLOCK_INIT_VALUE, 1)
+ #define AST_RWLOCK_DEFINE_STATIC_NOTRACKING(rwlock) __AST_RWLOCK_DEFINE(static, rwlock, AST_RWLOCK_INIT_VALUE_NOTRACKING, 0)
+
++#undef pthread_mutex_lock
++#undef pthread_mutex_unlock
++#undef pthread_mutex_trylock
++#undef pthread_mutex_init
++#undef pthread_mutex_destroy
++#undef pthread_cond_init
++#undef pthread_cond_destroy
++#undef pthread_cond_signal
++#undef pthread_cond_broadcast
++#undef pthread_cond_wait
++#undef pthread_cond_timedwait
+ #ifndef __CYGWIN__ /* temporary disabled for cygwin */
+ #define pthread_mutex_t use_ast_mutex_t_instead_of_pthread_mutex_t
+ #define pthread_cond_t use_ast_cond_t_instead_of_pthread_cond_t
+@@ -581,7 +592,7 @@ static void __attribute__((destructor))
#define gethostbyname __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__
@@ -11,7 +29,7 @@ $NetBSD: patch-include_asterisk_lock.h,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
#define pthread_create __use_ast_pthread_create_instead__
#endif
-@@ -591,6 +591,10 @@ int ast_atomic_fetchadd_int_slow(volatil
+@@ -603,6 +614,10 @@ int ast_atomic_fetchadd_int_slow(volatil
#include "libkern/OSAtomic.h"
#endif
@@ -22,7 +40,7 @@ $NetBSD: patch-include_asterisk_lock.h,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
/*! \brief Atomically add v to *p and return * the previous value of *p.
* This can be used to handle reference counts, and the return value
* can be used to generate unique identifiers.
-@@ -610,6 +614,12 @@ AST_INLINE_API(int ast_atomic_fetchadd_i
+@@ -622,6 +637,12 @@ AST_INLINE_API(int ast_atomic_fetchadd_i
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
{
return OSAtomicAdd64(v, (int64_t *) p) - v;
@@ -35,7 +53,7 @@ $NetBSD: patch-include_asterisk_lock.h,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
#elif defined (__i386__) || defined(__x86_64__)
#ifdef sun
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
-@@ -656,6 +666,12 @@ AST_INLINE_API(int ast_atomic_dec_and_te
+@@ -668,6 +689,12 @@ AST_INLINE_API(int ast_atomic_dec_and_te
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
{
return OSAtomicAdd64( -1, (int64_t *) p) == 0;