mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -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);]),
|
||||
|
Reference in New Issue
Block a user