21 #ifndef APR_PORTABLE_H
22 #define APR_PORTABLE_H
46 #if APR_HAVE_PTHREAD_H
66 typedef HANDLE apr_os_thread_t;
68 typedef DWORD apr_os_threadkey_t;
79 typedef TID apr_os_thread_t;
81 typedef PULONG apr_os_threadkey_t;
82 typedef struct timeval apr_os_imp_time_t;
83 typedef struct tm apr_os_exp_time_t;
87 #elif defined(__BEOS__)
88 #include <kernel/OS.h>
89 #include <kernel/image.h>
91 struct apr_os_proc_mutex_t {
99 typedef struct apr_os_proc_mutex_t apr_os_proc_mutex_t;
100 typedef thread_id apr_os_thread_t;
102 typedef int apr_os_threadkey_t;
103 typedef struct timeval apr_os_imp_time_t;
104 typedef struct tm apr_os_exp_time_t;
108 #elif defined(NETWARE)
113 typedef NXThreadId_t apr_os_thread_t;
115 typedef NXKey_t apr_os_threadkey_t;
116 typedef struct timeval apr_os_imp_time_t;
117 typedef struct tm apr_os_exp_time_t;
127 struct apr_os_proc_mutex_t {
128 #if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE
132 #if APR_HAS_PROC_PTHREAD_SERIALIZE
134 pthread_mutex_t *pthread_interproc;
138 #if APR_USE_PTHREAD_SERIALIZE
140 pthread_mutex_t *intraproc;
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
275 #if APR_HAS_THREADS || defined(DOXYGEN)
303 apr_os_thread_t *thethd,
313 apr_os_threadkey_t *thekey,
327 apr_os_thread_t tid2);
342 apr_os_file_t *thefile,
354 apr_os_file_t *thefile,
368 apr_os_file_t *thefile,
369 int register_cleanup,
379 apr_os_dir_t *thedir,
391 apr_os_sock_t *thesock,
415 apr_os_proc_mutex_t *ospmutex,
425 apr_os_imp_time_t **ostime,
435 apr_os_exp_time_t **ostime,
452 #if APR_HAS_DSO || defined(DOXYGEN)
464 apr_os_dso_handle_t thedso,