diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-02 16:28:13 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-02 16:28:13 +0000 |
commit | 394f34122bc573503642d483ece32d2a1328af68 (patch) | |
tree | 84514a13ba041a3e77688e68083e9ea7085c7932 /configure.ac | |
parent | f8415b9af852bb180203979b250c6771b4782d8a (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: http://svn.digium.com/svn/asterisk/trunk@46935 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
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);]), |