1251875Speter/* Licensed to the Apache Software Foundation (ASF) under one or more
2251875Speter * contributor license agreements.  See the NOTICE file distributed with
3251875Speter * this work for additional information regarding copyright ownership.
4251875Speter * The ASF licenses this file to You under the Apache License, Version 2.0
5251875Speter * (the "License"); you may not use this file except in compliance with
6251875Speter * the License.  You may obtain a copy of the License at
7251875Speter *
8251875Speter *     http://www.apache.org/licenses/LICENSE-2.0
9251875Speter *
10251875Speter * Unless required by applicable law or agreed to in writing, software
11251875Speter * distributed under the License is distributed on an "AS IS" BASIS,
12251875Speter * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13251875Speter * See the License for the specific language governing permissions and
14251875Speter * limitations under the License.
15251875Speter */
16251875Speter
17251875Speter#ifndef THREAD_RWLOCK_H
18251875Speter#define THREAD_RWLOCK_H
19251875Speter
20251875Speter#include "apr.h"
21251875Speter#include "apr_private.h"
22251875Speter#include "apr_general.h"
23251875Speter#include "apr_thread_rwlock.h"
24251875Speter#include "apr_pools.h"
25251875Speter
26251875Speter#if APR_HAVE_PTHREAD_H
27251875Speter/* this gives us pthread_rwlock_t */
28251875Speter#include <pthread.h>
29251875Speter#endif
30251875Speter
31251875Speter#if APR_HAS_THREADS
32251875Speter#ifdef HAVE_PTHREAD_RWLOCKS
33251875Speter
34251875Speterstruct apr_thread_rwlock_t {
35251875Speter    apr_pool_t *pool;
36251875Speter    pthread_rwlock_t rwlock;
37251875Speter};
38251875Speter
39251875Speter#else
40251875Speter
41251875Speterstruct apr_thread_rwlock_t {
42251875Speter    apr_pool_t *pool;
43251875Speter};
44251875Speter#endif
45251875Speter
46251875Speter#endif
47251875Speter
48251875Speter#endif  /* THREAD_RWLOCK_H */
49251875Speter
50