diff options
Diffstat (limited to 'include/arch/unix')
-rw-r--r-- | include/arch/unix/apr_arch_networkio.h | 3 | ||||
-rw-r--r-- | include/arch/unix/apr_arch_poll_private.h | 19 | ||||
-rw-r--r-- | include/arch/unix/apr_arch_proc_mutex.h | 26 | ||||
-rw-r--r-- | include/arch/unix/apr_arch_shm.h | 1 | ||||
-rw-r--r-- | include/arch/unix/apr_arch_threadproc.h | 10 | ||||
-rw-r--r-- | include/arch/unix/apr_private.h.in | 24 |
6 files changed, 67 insertions, 16 deletions
diff --git a/include/arch/unix/apr_arch_networkio.h b/include/arch/unix/apr_arch_networkio.h index 91018f7c6bd00..5f3189d966650 100644 --- a/include/arch/unix/apr_arch_networkio.h +++ b/include/arch/unix/apr_arch_networkio.h @@ -111,6 +111,9 @@ struct apr_socket_t { #ifndef HAVE_POLL int connected; #endif +#if APR_HAVE_SOCKADDR_UN + int bound; +#endif int local_port_unknown; int local_interface_unknown; int remote_addr_unknown; diff --git a/include/arch/unix/apr_arch_poll_private.h b/include/arch/unix/apr_arch_poll_private.h index 2dd7b1fd6fbee..ff81312313494 100644 --- a/include/arch/unix/apr_arch_poll_private.h +++ b/include/arch/unix/apr_arch_poll_private.h @@ -126,7 +126,7 @@ struct apr_pollset_t apr_file_t *wakeup_pipe[2]; apr_pollfd_t wakeup_pfd; apr_pollset_private_t *p; - apr_pollset_provider_t *provider; + const apr_pollset_provider_t *provider; }; typedef union { @@ -149,10 +149,14 @@ struct apr_pollcb_t { apr_pool_t *pool; apr_uint32_t nelts; apr_uint32_t nalloc; + apr_uint32_t flags; + /* Pipe descriptors used for wakeup */ + apr_file_t *wakeup_pipe[2]; + apr_pollfd_t wakeup_pfd; int fd; apr_pollcb_pset pollset; apr_pollfd_t **copyset; - apr_pollcb_provider_t *provider; + const apr_pollcb_provider_t *provider; }; struct apr_pollset_provider_t { @@ -169,10 +173,17 @@ struct apr_pollcb_provider_t { apr_status_t (*add)(apr_pollcb_t *, apr_pollfd_t *); apr_status_t (*remove)(apr_pollcb_t *, apr_pollfd_t *); apr_status_t (*poll)(apr_pollcb_t *, apr_interval_time_t, apr_pollcb_cb_t, void *); + apr_status_t (*cleanup)(apr_pollcb_t *); const char *name; }; -/* Private functions */ -void apr_pollset_drain_wakeup_pipe(apr_pollset_t *pollset); +/* + * Private functions used for the implementation of both apr_pollcb_* and + * apr_pollset_* + */ +apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd, + apr_file_t **wakeup_pipe); +apr_status_t apr_poll_close_wakeup_pipe(apr_file_t **wakeup_pipe); +void apr_poll_drain_wakeup_pipe(apr_file_t **wakeup_pipe); #endif /* APR_ARCH_POLL_PRIVATE_H */ diff --git a/include/arch/unix/apr_arch_proc_mutex.h b/include/arch/unix/apr_arch_proc_mutex.h index ec9796bc9d478..af49c17031f47 100644 --- a/include/arch/unix/apr_arch_proc_mutex.h +++ b/include/arch/unix/apr_arch_proc_mutex.h @@ -62,9 +62,6 @@ #if APR_HAVE_PTHREAD_H #include <pthread.h> #endif -#if APR_HAVE_SEMAPHORE_H -#include <semaphore.h> -#endif /* End System Headers */ struct apr_proc_mutex_unix_lock_methods_t { @@ -75,6 +72,8 @@ struct apr_proc_mutex_unix_lock_methods_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 *); + apr_status_t (*perms_set)(apr_proc_mutex_t *, apr_fileperms_t, apr_uid_t, apr_gid_t); + apr_lockmech_e mech; const char *name; }; typedef struct apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_lock_methods_t; @@ -93,17 +92,24 @@ union semun { struct apr_proc_mutex_t { apr_pool_t *pool; const apr_proc_mutex_unix_lock_methods_t *meth; - const apr_proc_mutex_unix_lock_methods_t *inter_meth; int curr_locked; char *fname; -#if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE - apr_file_t *interproc; -#endif -#if APR_HAS_POSIXSEM_SERIALIZE - sem_t *psem_interproc; + + apr_os_proc_mutex_t os; /* Native mutex holder. */ + +#if APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE + apr_file_t *interproc; /* For apr_file_ calls on native fd. */ + int interproc_closing; /* whether the native fd is opened/closed with + * 'interproc' or apr_os_file_put()ed (hence + * needing an an explicit close for consistency + * with other methods). + */ #endif #if APR_HAS_PROC_PTHREAD_SERIALIZE - pthread_mutex_t *pthread_interproc; + int pthread_refcounting; /* Whether the native mutex is refcounted or + * apr_os_proc_mutex_put()ed, which makes + * refcounting impossible/undesirable. + */ #endif }; diff --git a/include/arch/unix/apr_arch_shm.h b/include/arch/unix/apr_arch_shm.h index bbd373e363282..e9d25cadb404b 100644 --- a/include/arch/unix/apr_arch_shm.h +++ b/include/arch/unix/apr_arch_shm.h @@ -67,6 +67,7 @@ struct apr_shm_t { const char *filename; /* NULL if anonymous */ #if APR_USE_SHMEM_SHMGET || APR_USE_SHMEM_SHMGET_ANON int shmid; /* shmem ID returned from shmget() */ + key_t shmkey; /* shmem key IPC_ANON or returned from ftok() */ #endif }; diff --git a/include/arch/unix/apr_arch_threadproc.h b/include/arch/unix/apr_arch_threadproc.h index a61830f6ee8ce..7a3b3c0925b5f 100644 --- a/include/arch/unix/apr_arch_threadproc.h +++ b/include/arch/unix/apr_arch_threadproc.h @@ -19,6 +19,7 @@ #include "apr_thread_proc.h" #include "apr_file_io.h" #include "apr_arch_file_io.h" +#include "apr_perms_set.h" /* System headers required for thread/process library */ #if APR_HAVE_PTHREAD_H @@ -76,6 +77,14 @@ struct apr_thread_once_t { #endif +typedef struct apr_procattr_pscb_t apr_procattr_pscb_t; +struct apr_procattr_pscb_t { + struct apr_procattr_pscb_t *next; + apr_perms_setfn_t *perms_set_fn; + apr_fileperms_t perms; + const void *data; +}; + struct apr_procattr_t { apr_pool_t *pool; apr_file_t *parent_in; @@ -103,6 +112,7 @@ struct apr_procattr_t { apr_int32_t errchk; apr_uid_t uid; apr_gid_t gid; + apr_procattr_pscb_t *perms_set_callbacks; }; #endif /* ! THREAD_PROC_H */ diff --git a/include/arch/unix/apr_private.h.in b/include/arch/unix/apr_private.h.in index 12af027472ece..c794b1962ec3e 100644 --- a/include/arch/unix/apr_private.h.in +++ b/include/arch/unix/apr_private.h.in @@ -8,6 +8,9 @@ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD +/* Define if apr_allocator should use guard pages */ +#undef APR_ALLOCATOR_GUARD_PAGES + /* Define if apr_allocator should use mmap */ #undef APR_ALLOCATOR_USES_MMAP @@ -18,6 +21,9 @@ /* Define as function used for conversion of strings to apr_off_t */ #undef APR_OFF_T_STRFN +/* Define if pool functions should abort if concurrent usage is detected */ +#undef APR_POOL_CONCURRENCY_CHECK + /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ @@ -274,6 +280,9 @@ /* Define if MAP_ANON is defined in sys/mman.h */ #undef HAVE_MAP_ANON +/* Define to 1 if you have the <memcheck.h> header file. */ +#undef HAVE_MEMCHECK_H + /* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR @@ -295,6 +304,9 @@ /* Define to 1 if you have the `mmap64' function. */ #undef HAVE_MMAP64 +/* Define to 1 if you have the `mprotect' function. */ +#undef HAVE_MPROTECT + /* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP @@ -316,6 +328,9 @@ /* Define to 1 if you have the <net/errno.h> header file. */ #undef HAVE_NET_ERRNO_H +/* Define to 1 if you have the <net/if.h> header file. */ +#undef HAVE_NET_IF_H + /* Define to 1 if you have the `nl_langinfo' function. */ #undef HAVE_NL_LANGINFO @@ -688,6 +703,12 @@ /* Define to 1 if you have the <uuid/uuid.h> header file. */ #undef HAVE_UUID_UUID_H +/* Compile in valgrind support */ +#undef HAVE_VALGRIND + +/* Define to 1 if you have the <valgrind.h> header file. */ +#undef HAVE_VALGRIND_H + /* Define if C compiler supports VLA */ #undef HAVE_VLA @@ -706,8 +727,7 @@ /* Define for z/OS pthread API nuances */ #undef HAVE_ZOS_PTHREADS -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define if EAI_ error codes from getaddrinfo are negative */ |