21 #ifndef APR_PORTABLE_H
22 #define APR_PORTABLE_H
46 #if APR_HAVE_PTHREAD_H
49 #if APR_HAVE_SEMAPHORE_H
50 #include <semaphore.h>
69 typedef HANDLE apr_os_thread_t;
71 typedef DWORD apr_os_threadkey_t;
82 typedef TID apr_os_thread_t;
84 typedef PULONG apr_os_threadkey_t;
85 typedef struct timeval apr_os_imp_time_t;
86 typedef struct tm apr_os_exp_time_t;
90 #elif defined(__BEOS__)
91 #include <kernel/OS.h>
92 #include <kernel/image.h>
94 struct apr_os_proc_mutex_t {
102 typedef struct apr_os_proc_mutex_t apr_os_proc_mutex_t;
103 typedef thread_id apr_os_thread_t;
105 typedef int apr_os_threadkey_t;
106 typedef struct timeval apr_os_imp_time_t;
107 typedef struct tm apr_os_exp_time_t;
111 #elif defined(NETWARE)
116 typedef NXThreadId_t apr_os_thread_t;
118 typedef NXKey_t apr_os_threadkey_t;
119 typedef struct timeval apr_os_imp_time_t;
120 typedef struct tm apr_os_exp_time_t;
130 struct apr_os_proc_mutex_t {
131 #if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE
135 #if APR_HAS_PROC_PTHREAD_SERIALIZE
137 pthread_mutex_t *pthread_interproc;
139 #if APR_HAS_POSIXSEM_SERIALIZE
141 sem_t *psem_interproc;
148 typedef struct apr_os_proc_mutex_t apr_os_proc_mutex_t;
151 #if APR_HAS_THREADS && APR_HAVE_PTHREAD_H
152 typedef pthread_t apr_os_thread_t;
153 typedef pthread_key_t apr_os_threadkey_t;
157 typedef struct timeval apr_os_imp_time_t;
158 typedef struct tm apr_os_exp_time_t;
162 #if defined(HPUX) || defined(HPUX10) || defined(HPUX11)
165 #elif defined(DARWIN)
166 #include <mach-o/dyld.h>
194 #if APR_PROC_MUTEX_IS_GLOBAL || defined(DOXYGEN)
196 #define apr_os_global_mutex_t apr_os_proc_mutex_t
198 #define apr_os_global_mutex_get apr_os_proc_mutex_get
288 #if APR_HAS_THREADS || defined(DOXYGEN)
316 apr_os_thread_t *thethd,
326 apr_os_threadkey_t *thekey,
340 apr_os_thread_t tid2);
355 apr_os_file_t *thefile,
367 apr_os_file_t *thefile,
381 apr_os_file_t *thefile,
382 int register_cleanup,
392 apr_os_dir_t *thedir,
407 apr_os_sock_t *thesock,
431 apr_os_proc_mutex_t *ospmutex,
447 apr_os_proc_mutex_t *ospmutex,
449 int register_cleanup,
459 apr_os_imp_time_t **ostime,
469 apr_os_exp_time_t **ostime,
486 #if APR_HAS_DSO || defined(DOXYGEN)
498 apr_os_dso_handle_t thedso,
struct apr_socket_t apr_socket_t
Definition: apr_network_io.h:246
apr_status_t apr_os_pipe_put(apr_file_t **file, apr_os_file_t *thefile, apr_pool_t *cont)
int type
Definition: apr_portable.h:188
struct apr_thread_t apr_thread_t
Definition: apr_thread_proc.h:188
Definition: apr_time.h:97
int apr_os_thread_equal(apr_os_thread_t tid1, apr_os_thread_t tid2)
struct apr_thread_mutex_t apr_thread_mutex_t
Definition: apr_thread_mutex.h:41
pid_t apr_os_proc_t
Definition: apr_portable.h:156
int protocol
Definition: apr_portable.h:189
#define apr_os_global_mutex_t
Definition: apr_portable.h:196
apr_status_t apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex, apr_proc_mutex_t *pmutex, apr_lockmech_e *mech)
APR Dynamic Object Handling Routines.
#define apr_os_global_mutex_get
Definition: apr_portable.h:198
apr_status_t apr_os_thread_get(apr_os_thread_t **thethd, apr_thread_t *thd)
struct apr_global_mutex_t apr_global_mutex_t
Definition: apr_global_mutex.h:47
struct apr_dso_handle_t apr_dso_handle_t
Definition: apr_dso.h:44
int apr_os_file_t
Definition: apr_portable.h:145
apr_os_sock_t * os_sock
Definition: apr_portable.h:184
apr_status_t apr_os_threadkey_put(apr_threadkey_t **key, apr_os_threadkey_t *thekey, apr_pool_t *cont)
apr_status_t apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex, apr_proc_mutex_t *pmutex)
struct tm apr_os_exp_time_t
Definition: apr_portable.h:158
struct apr_proc_mutex_t apr_proc_mutex_t
Definition: apr_proc_mutex.h:57
struct apr_os_proc_mutex_t apr_os_proc_mutex_t
Definition: apr_portable.h:148
apr_status_t apr_os_shm_put(apr_shm_t **shm, apr_os_shm_t *osshm, apr_pool_t *cont)
struct apr_file_t apr_file_t
Definition: apr_file_io.h:216
apr_int64_t apr_time_t
Definition: apr_time.h:45
int apr_os_sock_t
Definition: apr_portable.h:147
APR Global Locking Routines.
struct timeval apr_os_imp_time_t
Definition: apr_portable.h:157
apr_status_t apr_os_sock_get(apr_os_sock_t *thesock, apr_socket_t *sock)
struct apr_shm_t apr_shm_t
Definition: apr_shm.h:44
apr_os_thread_t apr_os_thread_current(void)
apr_status_t apr_os_sock_make(apr_socket_t **apr_sock, apr_os_sock_info_t *os_sock_info, apr_pool_t *cont)
APR Shared Memory Routines.
apr_lockmech_e
Definition: apr_proc_mutex.h:46
APR Platform Definitions.
apr_status_t apr_os_shm_get(apr_os_shm_t *osshm, apr_shm_t *shm)
Definition: apr_portable.h:183
void * apr_os_shm_t
Definition: apr_portable.h:171
apr_status_t apr_os_file_get(apr_os_file_t *thefile, apr_file_t *file)
DIR apr_os_dir_t
Definition: apr_portable.h:146
int family
Definition: apr_portable.h:187
apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_threadkey_t *key)
APR Process Locking Routines.
apr_status_t apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex, apr_os_proc_mutex_t *ospmutex, apr_pool_t *cont)
APR Thread and Process Library.
apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime, apr_time_exp_t *aprtime)
const char * apr_os_locale_encoding(apr_pool_t *pool)
struct sockaddr * local
Definition: apr_portable.h:185
apr_status_t apr_os_sock_put(apr_socket_t **sock, apr_os_sock_t *thesock, apr_pool_t *cont)
apr_status_t apr_os_thread_put(apr_thread_t **thd, apr_os_thread_t *thethd, apr_pool_t *cont)
apr_status_t apr_os_dir_put(apr_dir_t **dir, apr_os_dir_t *thedir, apr_pool_t *cont)
void * apr_os_dso_handle_t
Definition: apr_portable.h:169
apr_status_t apr_os_dso_handle_put(apr_dso_handle_t **dso, apr_os_dso_handle_t thedso, apr_pool_t *pool)
apr_status_t apr_os_pipe_put_ex(apr_file_t **file, apr_os_file_t *thefile, int register_cleanup, apr_pool_t *cont)
apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime, apr_time_t *aprtime)
apr_status_t apr_os_exp_time_put(apr_time_exp_t *aprtime, apr_os_exp_time_t **ostime, apr_pool_t *cont)
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
struct sockaddr * remote
Definition: apr_portable.h:186
int apr_status_t
Definition: apr_errno.h:44
struct apr_threadkey_t apr_threadkey_t
Definition: apr_thread_proc.h:200
struct apr_dir_t apr_dir_t
Definition: apr_file_info.h:121
apr_status_t apr_os_dso_handle_get(apr_os_dso_handle_t *dso, apr_dso_handle_t *aprdso)
apr_status_t apr_os_imp_time_put(apr_time_t *aprtime, apr_os_imp_time_t **ostime, apr_pool_t *cont)
apr_status_t apr_os_dir_get(apr_os_dir_t **thedir, apr_dir_t *dir)
apr_status_t apr_os_file_put(apr_file_t **file, apr_os_file_t *thefile, apr_int32_t flags, apr_pool_t *cont)
const char * apr_os_default_encoding(apr_pool_t *pool)
apr_status_t apr_os_proc_mutex_put_ex(apr_proc_mutex_t **pmutex, apr_os_proc_mutex_t *ospmutex, apr_lockmech_e mech, int register_cleanup, apr_pool_t *cont)