00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef APR_THREAD_MUTEX_H
00018 #define APR_THREAD_MUTEX_H
00019
00025 #include "apr.h"
00026 #include "apr_errno.h"
00027
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031
00032 #if APR_HAS_THREADS || defined(DOXYGEN)
00033
00041 typedef struct apr_thread_mutex_t apr_thread_mutex_t;
00042
00043 #define APR_THREAD_MUTEX_DEFAULT 0x0
00044 #define APR_THREAD_MUTEX_NESTED 0x1
00045 #define APR_THREAD_MUTEX_UNNESTED 0x2
00047
00048 #include "apr_pools.h"
00049
00065 APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
00066 unsigned int flags,
00067 apr_pool_t *pool);
00073 APR_DECLARE(apr_status_t) apr_thread_mutex_lock(apr_thread_mutex_t *mutex);
00074
00082 APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex);
00083
00088 APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex);
00089
00094 APR_DECLARE(apr_status_t) apr_thread_mutex_destroy(apr_thread_mutex_t *mutex);
00095
00100 APR_POOL_DECLARE_ACCESSOR(thread_mutex);
00101
00102 #endif
00103
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109
00110 #endif