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