aboutsummaryrefslogtreecommitdiffstats
path: root/include/arch/unix
diff options
context:
space:
mode:
Diffstat (limited to 'include/arch/unix')
-rw-r--r--include/arch/unix/apr_arch_atomic.h18
-rw-r--r--include/arch/unix/apr_arch_proc_mutex.h2
-rw-r--r--include/arch/unix/apr_arch_thread_mutex.h3
-rw-r--r--include/arch/unix/apr_private.h.in57
4 files changed, 74 insertions, 6 deletions
diff --git a/include/arch/unix/apr_arch_atomic.h b/include/arch/unix/apr_arch_atomic.h
index f8019060e505..559257debb72 100644
--- a/include/arch/unix/apr_arch_atomic.h
+++ b/include/arch/unix/apr_arch_atomic.h
@@ -18,28 +18,36 @@
#define ATOMIC_H
#include "apr.h"
+#include "apr_pools.h"
#include "apr_private.h"
#include "apr_atomic.h"
-#include "apr_thread_mutex.h"
#if defined(USE_ATOMICS_GENERIC)
/* noop */
-#elif defined(__GNUC__) && defined(__STRICT_ANSI__)
-/* force use of generic atomics if building e.g. with -std=c89, which
- * doesn't allow inline asm */
-# define USE_ATOMICS_GENERIC
#elif HAVE_ATOMIC_BUILTINS
# define USE_ATOMICS_BUILTINS
#elif defined(SOLARIS2) && SOLARIS2 >= 10
# define USE_ATOMICS_SOLARIS
+# define NEED_ATOMICS_GENERIC64
+#elif defined(__GNUC__) && defined(__STRICT_ANSI__)
+/* force use of generic atomics if building e.g. with -std=c89, which
+ * doesn't allow inline asm */
+# define USE_ATOMICS_GENERIC
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
# define USE_ATOMICS_IA32
+# define NEED_ATOMICS_GENERIC64
#elif defined(__GNUC__) && (defined(__PPC__) || defined(__ppc__))
# define USE_ATOMICS_PPC
+# define NEED_ATOMICS_GENERIC64
#elif defined(__GNUC__) && (defined(__s390__) || defined(__s390x__))
# define USE_ATOMICS_S390
+# define NEED_ATOMICS_GENERIC64
#else
# define USE_ATOMICS_GENERIC
#endif
+#if defined(USE_ATOMICS_GENERIC) || defined (NEED_ATOMICS_GENERIC64)
+apr_status_t apr__atomic_generic64_init(apr_pool_t *p);
+#endif
+
#endif /* ATOMIC_H */
diff --git a/include/arch/unix/apr_arch_proc_mutex.h b/include/arch/unix/apr_arch_proc_mutex.h
index af49c17031f4..cfa0049f754b 100644
--- a/include/arch/unix/apr_arch_proc_mutex.h
+++ b/include/arch/unix/apr_arch_proc_mutex.h
@@ -26,6 +26,7 @@
#include "apr_portable.h"
#include "apr_file_io.h"
#include "apr_arch_file_io.h"
+#include "apr_time.h"
/* System headers required by Locks library */
#if APR_HAVE_SYS_TYPES_H
@@ -69,6 +70,7 @@ struct apr_proc_mutex_unix_lock_methods_t {
apr_status_t (*create)(apr_proc_mutex_t *, const char *);
apr_status_t (*acquire)(apr_proc_mutex_t *);
apr_status_t (*tryacquire)(apr_proc_mutex_t *);
+ apr_status_t (*timedacquire)(apr_proc_mutex_t *, apr_interval_time_t);
apr_status_t (*release)(apr_proc_mutex_t *);
apr_status_t (*cleanup)(void *);
apr_status_t (*child_init)(apr_proc_mutex_t **, apr_pool_t *, const char *);
diff --git a/include/arch/unix/apr_arch_thread_mutex.h b/include/arch/unix/apr_arch_thread_mutex.h
index 40cdef3c656b..4fe46c3b4275 100644
--- a/include/arch/unix/apr_arch_thread_mutex.h
+++ b/include/arch/unix/apr_arch_thread_mutex.h
@@ -21,6 +21,7 @@
#include "apr_private.h"
#include "apr_general.h"
#include "apr_thread_mutex.h"
+#include "apr_thread_cond.h"
#include "apr_portable.h"
#include "apr_atomic.h"
@@ -32,6 +33,8 @@
struct apr_thread_mutex_t {
apr_pool_t *pool;
pthread_mutex_t mutex;
+ apr_thread_cond_t *cond;
+ int locked, num_waiters;
};
#endif
diff --git a/include/arch/unix/apr_private.h.in b/include/arch/unix/apr_private.h.in
index c794b1962ec3..2377fcbf4336 100644
--- a/include/arch/unix/apr_private.h.in
+++ b/include/arch/unix/apr_private.h.in
@@ -89,6 +89,12 @@
/* Define if accept4 function is supported */
#undef HAVE_ACCEPT4
+/* Define to 1 if you have the `acquire_sem' function. */
+#undef HAVE_ACQUIRE_SEM
+
+/* Define to 1 if you have the `acquire_sem_etc' function. */
+#undef HAVE_ACQUIRE_SEM_ETC
+
/* Define if async i/o supports message q's */
#undef HAVE_AIO_MSGQ
@@ -99,6 +105,9 @@
*/
#undef HAVE_ALLOCA_H
+/* Define to 1 if you have the `arc4random_buf' function. */
+#undef HAVE_ARC4RANDOM_BUF
+
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
@@ -129,6 +138,10 @@
/* Define to 1 if you have the <ctype.h> header file. */
#undef HAVE_CTYPE_H
+/* Define to 1 if you have the declaration of `SYS_getrandom', and to 0 if you
+ don't. */
+#undef HAVE_DECL_SYS_GETRANDOM
+
/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
don't. */
#undef HAVE_DECL_SYS_SIGLIST
@@ -217,6 +230,9 @@
/* Define to 1 if you have the `getpwuid_r' function. */
#undef HAVE_GETPWUID_R
+/* Define to 1 if you have the `getrandom' function. */
+#undef HAVE_GETRANDOM
+
/* Define to 1 if you have the `getrlimit' function. */
#undef HAVE_GETRLIMIT
@@ -232,6 +248,12 @@
/* Define if hstrerror is present */
#undef HAVE_HSTRERROR
+/* Define to 1 if you have the `if_indextoname' function. */
+#undef HAVE_IF_INDEXTONAME
+
+/* Define to 1 if you have the `if_nametoindex' function. */
+#undef HAVE_IF_NAMETOINDEX
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -265,6 +287,9 @@
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
+/* Define to 1 if you have the <linux/random.h> header file. */
+#undef HAVE_LINUX_RANDOM_H
+
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
@@ -361,6 +386,9 @@
/* Define to 1 if you have the `pthread_attr_setguardsize' function. */
#undef HAVE_PTHREAD_ATTR_SETGUARDSIZE
+/* Define to 1 if you have the `pthread_condattr_setpshared' function. */
+#undef HAVE_PTHREAD_CONDATTR_SETPSHARED
+
/* Define to 1 if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
@@ -376,6 +404,12 @@
/* Define if cross-process robust mutexes are available */
#undef HAVE_PTHREAD_MUTEX_ROBUST
+/* Define if non-posix/portable cross-process robust mutexes are available */
+#undef HAVE_PTHREAD_MUTEX_ROBUST_NP
+
+/* Define to 1 if you have the `pthread_mutex_timedlock' function. */
+#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
+
/* Define if PTHREAD_PROCESS_SHARED is defined in pthread.h */
#undef HAVE_PTHREAD_PROCESS_SHARED
@@ -412,12 +446,21 @@
/* Define to 1 if you have the `semget' function. */
#undef HAVE_SEMGET
+/* Define to 1 if you have the `semop' function. */
+#undef HAVE_SEMOP
+
+/* Define to 1 if you have the `semtimedop' function. */
+#undef HAVE_SEMTIMEDOP
+
/* Define to 1 if you have the `sem_close' function. */
#undef HAVE_SEM_CLOSE
/* Define to 1 if you have the `sem_post' function. */
#undef HAVE_SEM_POST
+/* Define to 1 if you have the `sem_timedwait' function. */
+#undef HAVE_SEM_TIMEDWAIT
+
/* Define if SEM_UNDO is defined in sys/sem.h */
#undef HAVE_SEM_UNDO
@@ -601,6 +644,9 @@
/* Define to 1 if you have the <sys/poll.h> header file. */
#undef HAVE_SYS_POLL_H
+/* Define to 1 if you have the <sys/random.h> header file. */
+#undef HAVE_SYS_RANDOM_H
+
/* Define to 1 if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
@@ -628,6 +674,9 @@
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
+/* Define to 1 if you have the <sys/syscall.h> header file. */
+#undef HAVE_SYS_SYSCALL_H
+
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#undef HAVE_SYS_SYSCTL_H
@@ -763,7 +812,7 @@
/* Define if pthread_getspecific() has two args */
#undef PTHREAD_GETSPECIFIC_TAKES_TWO_ARGS
-/* Define if readdir is thread safe */
+/* Modern readdir is thread safe */
#undef READDIR_IS_THREAD_SAFE
/* Define to 1 if the `setpgrp' function takes no argument. */
@@ -825,6 +874,9 @@
/* Define if SysV semaphores affect threads within the process */
#undef SYSVSEM_IS_GLOBAL
+/* Define system call of random */
+#undef SYS_RANDOM
+
/* Define if use of generic atomics is requested */
#undef USE_ATOMICS_GENERIC
@@ -837,6 +889,9 @@
/* Define if 4.2BSD-style flock() will be used */
#undef USE_FLOCK_SERIALIZE
+/* Define if pthread pshared mutex will be used */
+#undef USE_PROC_PTHREAD_SERIALIZE
+
/* Define if BeOS areas will be used */
#undef USE_SHMEM_BEOS