axis2_thread_mutex.h

00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 
00019 #ifndef AXIS2_THREAD_MUTEX_H
00020 #define AXIS2_THREAD_MUTEX_H
00021 
00027 #include <axis2_const.h>
00028 #include <axutil_allocator.h>
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif /* __cplusplus */
00033 
00034 
00042 typedef struct axutil_thread_mutex_t axutil_thread_mutex_t;
00043 
00044 #define AXIS2_THREAD_MUTEX_DEFAULT  0x0   
00045 #define AXIS2_THREAD_MUTEX_NESTED   0x1   
00046 #define AXIS2_THREAD_MUTEX_UNNESTED 0x2   
00064 AXIS2_EXTERN axutil_thread_mutex_t * AXIS2_CALL 
00065 axutil_thread_mutex_create(axutil_allocator_t *allocator,
00066                           unsigned int flags);
00072 AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00073 axutil_thread_mutex_lock(axutil_thread_mutex_t *mutex);
00074 
00080 AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00081 axutil_thread_mutex_trylock(axutil_thread_mutex_t *mutex);
00082 
00087 AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00088 axutil_thread_mutex_unlock(axutil_thread_mutex_t *mutex);
00089 
00094 AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00095 axutil_thread_mutex_destroy(axutil_thread_mutex_t *mutex);
00096 
00099 #ifdef __cplusplus
00100 }
00101 #endif
00102 
00103 #endif  /* AXIS2_THREAD_MUTEX_H */

Generated on Thu May 3 12:31:01 2007 for Axis2/C by  doxygen 1.4.6