diff options
author | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2001-09-14 15:39:38 +0000 |
---|---|---|
committer | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2001-09-14 15:39:38 +0000 |
commit | 1712868760e1dc1d93ac5a47c7ce081c9b025827 (patch) | |
tree | 078ea81b2424ff5246eb6ccfc65225d34a21b5b9 /locks | |
parent | b55b644967d89ce46d933ae338cec97353079416 (diff) | |
download | libapr-1712868760e1dc1d93ac5a47c7ce081c9b025827.tar.gz |
Just because we have pthreads, that doesn't mean we have pthread_rwlock.
This removes support for rwlock on platforms that don't have them. I will
write an implementation of rwlocks that don't rely on pthreads later this
weekend.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62323 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks')
-rw-r--r-- | locks/unix/thread_rwlock.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/locks/unix/thread_rwlock.c b/locks/unix/thread_rwlock.c index 95ef5e542..dc9377beb 100644 --- a/locks/unix/thread_rwlock.c +++ b/locks/unix/thread_rwlock.c @@ -53,9 +53,12 @@ */ #include "thread_rwlock.h" +#include "apr_private.h" #if APR_HAS_THREADS +#ifdef HAVE_PTHREAD_RWLOCK_INIT + static apr_status_t thread_rwlock_cleanup(void *data) { apr_thread_rwlock_t *rwlock = (apr_thread_rwlock_t *)data; @@ -189,4 +192,49 @@ APR_DECLARE(apr_status_t) apr_thread_rwlock_destroy(apr_thread_rwlock_t *rwlock) return stat; } +#else /* HAVE_PTHREAD_RWLOCK_INIT */ + +APR_DECLARE(apr_status_t) apr_thread_rwlock_create(apr_thread_rwlock_t **rwlock, + apr_pool_t *pool) +{ + return APR_ENOTIMPL; +} + +APR_DECLARE(apr_status_t) apr_thread_rwlock_rdlock(apr_thread_rwlock_t *rwlock) +{ + return APR_ENOTIMPL; +} + +APR_DECLARE(apr_status_t) apr_thread_rwlock_tryrdlock(apr_thread_rwlock_t *rwlock) +{ + return APR_ENOTIMPL; +} + +APR_DECLARE(apr_status_t) apr_thread_rwlock_wrlock(apr_thread_rwlock_t *rwlock) +{ + return APR_ENOTIMPL; +} + +APR_DECLARE(apr_status_t) apr_thread_rwlock_trywrlock(apr_thread_rwlock_t *rwlock) +{ + return APR_ENOTIMPL; +} + +APR_DECLARE(apr_status_t) apr_thread_rwlock_lock(apr_thread_rwlock_t *rwlock) +{ + return APR_ENOTIMPL; +} + +APR_DECLARE(apr_status_t) apr_thread_rwlock_unlock(apr_thread_rwlock_t *rwlock) +{ + return APR_ENOTIMPL; +} + +APR_DECLARE(apr_status_t) apr_thread_rwlock_destroy(apr_thread_rwlock_t *rwlock) +{ + return APR_ENOTIMPL; +} + +#endif /* HAVE_PTHREAD_RWLOCK_INIT */ + #endif /* APR_HAS_THREADS */ |