GME  13
apr_thread_cond.h
Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef APR_THREAD_COND_H
00018 #define APR_THREAD_COND_H
00019 
00025 #include "apr.h"
00026 #include "apr_pools.h"
00027 #include "apr_errno.h"
00028 #include "apr_time.h"
00029 #include "apr_thread_mutex.h"
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif /* __cplusplus */
00034 
00035 #if APR_HAS_THREADS || defined(DOXYGEN)
00036 
00044 typedef struct apr_thread_cond_t apr_thread_cond_t;
00045 
00059 APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
00060                                                  apr_pool_t *pool);
00061 
00077 APR_DECLARE(apr_status_t) apr_thread_cond_wait(apr_thread_cond_t *cond,
00078                                                apr_thread_mutex_t *mutex);
00079 
00096 APR_DECLARE(apr_status_t) apr_thread_cond_timedwait(apr_thread_cond_t *cond,
00097                                                     apr_thread_mutex_t *mutex,
00098                                                     apr_interval_time_t timeout);
00099 
00108 APR_DECLARE(apr_status_t) apr_thread_cond_signal(apr_thread_cond_t *cond);
00109 
00117 APR_DECLARE(apr_status_t) apr_thread_cond_broadcast(apr_thread_cond_t *cond);
00118 
00123 APR_DECLARE(apr_status_t) apr_thread_cond_destroy(apr_thread_cond_t *cond);
00124 
00129 APR_POOL_DECLARE_ACCESSOR(thread_cond);
00130 
00131 #endif /* APR_HAS_THREADS */
00132 
00135 #ifdef __cplusplus
00136 }
00137 #endif
00138 
00139 #endif  /* ! APR_THREAD_COND_H */