summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2006-11-02 16:28:13 +0000
committerJoshua Colp <jcolp@digium.com>2006-11-02 16:28:13 +0000
commitaebb4aaa0d071e0a750223437dcb479a5b1eae33 (patch)
tree84514a13ba041a3e77688e68083e9ea7085c7932 /configure.ac
parent946eebf16f321a057c2c67681ddedf6c4e6e1cd3 (diff)
I'm crazy so I will add this... pthread rwlock wrappers, along with autoconf stuff that detects the presence of the initializer and the ability to set the kind of lock (in our case we rather like writer preferred locks so writer starvation doesn't occur... but on something like Darwin we don't get that)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 106049d61..33875dc51 100644
--- a/configure.ac
+++ b/configure.ac
@@ -267,6 +267,9 @@ AC_CHECK_FUNCS([funopen fopencookie])
# some systems already have gethostbyname_r so we don't need to build ours in main/utils.c
AC_CHECK_FUNCS([gethostbyname_r])
+AST_C_DEFINE_CHECK([PTHREAD_RWLOCK_INITIALIZER], [PTHREAD_RWLOCK_INITIALIZER], [pthread.h])
+AST_C_DEFINE_CHECK([PTHREAD_RWLOCK_PREFER_WRITER_NP], [PTHREAD_RWLOCK_PREFER_WRITER_NP], [pthread.h])
+
AC_MSG_CHECKING(for compiler atomic operations)
AC_LINK_IFELSE(
AC_LANG_PROGRAM([], [int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);]),