133965Sjdp/* Licensed to the Apache Software Foundation (ASF) under one or more
278828Sobrien * contributor license agreements.  See the NOTICE file distributed with
3218822Sdim * this work for additional information regarding copyright ownership.
477298Sobrien * The ASF licenses this file to You under the Apache License, Version 2.0
533965Sjdp * (the "License"); you may not use this file except in compliance with
633965Sjdp * the License.  You may obtain a copy of the License at
760484Sobrien *
860484Sobrien *     http://www.apache.org/licenses/LICENSE-2.0
933965Sjdp *
1060484Sobrien * Unless required by applicable law or agreed to in writing, software
1160484Sobrien * distributed under the License is distributed on an "AS IS" BASIS,
1260484Sobrien * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1360484Sobrien * See the License for the specific language governing permissions and
1433965Sjdp * limitations under the License.
1560484Sobrien */
1660484Sobrien
1760484Sobrien#ifndef THREAD_RWLOCK_H
1860484Sobrien#define THREAD_RWLOCK_H
1960484Sobrien
2060484Sobrien#include "apr.h"
2160484Sobrien#include "apr_private.h"
22218822Sdim#include "apr_general.h"
2360484Sobrien#include "apr_thread_rwlock.h"
2460484Sobrien#include "apr_pools.h"
2533965Sjdp
2633965Sjdp#if APR_HAVE_PTHREAD_H
2733965Sjdp/* this gives us pthread_rwlock_t */
2833965Sjdp#include <pthread.h>
2933965Sjdp#endif
3033965Sjdp
3133965Sjdp#if APR_HAS_THREADS
3233965Sjdp#ifdef HAVE_PTHREAD_RWLOCKS
3333965Sjdp
3433965Sjdpstruct apr_thread_rwlock_t {
3533965Sjdp    apr_pool_t *pool;
3633965Sjdp    pthread_rwlock_t rwlock;
3733965Sjdp};
3833965Sjdp
3933965Sjdp#else
4033965Sjdp
4133965Sjdpstruct apr_thread_rwlock_t {
4233965Sjdp    apr_pool_t *pool;
4333965Sjdp};
4433965Sjdp#endif
4533965Sjdp
4633965Sjdp#endif
4733965Sjdp
4833965Sjdp#endif  /* THREAD_RWLOCK_H */
4933965Sjdp
5033965Sjdp