summaryrefslogtreecommitdiff
path: root/locks
diff options
context:
space:
mode:
authoraaron <aaron@13f79535-47bb-0310-9956-ffa450edef68>2002-02-18 01:21:19 +0000
committeraaron <aaron@13f79535-47bb-0310-9956-ffa450edef68>2002-02-18 01:21:19 +0000
commitcb575955d1e667837a90af0ff5b64ad445241611 (patch)
tree61007ebc948a645915a0fb258f8ea318979f6af1 /locks
parente18769ffc475605440d67d082f55f08c74ea08c6 (diff)
downloadlibapr-cb575955d1e667837a90af0ff5b64ad445241611.tar.gz
Change the name of the 'stat' variable so we don't shadow the libc symbol.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63002 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks')
-rw-r--r--locks/unix/thread_cond.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/locks/unix/thread_cond.c b/locks/unix/thread_cond.c
index 0a107569a..963f185cf 100644
--- a/locks/unix/thread_cond.c
+++ b/locks/unix/thread_cond.c
@@ -62,22 +62,22 @@
static apr_status_t thread_cond_cleanup(void *data)
{
apr_thread_cond_t *cond = (apr_thread_cond_t *)data;
- apr_status_t stat;
+ apr_status_t rv;
- stat = pthread_cond_destroy(cond->cond);
+ rv = pthread_cond_destroy(cond->cond);
#ifdef PTHREAD_SETS_ERRNO
- if (stat) {
- stat = errno;
+ if (rv) {
+ rv = errno;
}
#endif
- return stat;
+ return rv;
}
APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
apr_pool_t *pool)
{
apr_thread_cond_t *new_cond;
- apr_status_t stat;
+ apr_status_t rv;
new_cond = (apr_thread_cond_t *)apr_pcalloc(pool,
sizeof(apr_thread_cond_t));
@@ -94,12 +94,12 @@ APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
return APR_ENOMEM;
}
- if ((stat = pthread_cond_init(new_cond->cond, NULL))) {
+ if ((rv = pthread_cond_init(new_cond->cond, NULL))) {
#ifdef PTHREAD_SETS_ERRNO
- stat = errno;
+ rv = errno;
#endif
thread_cond_cleanup(new_cond);
- return stat;
+ return rv;
}
apr_pool_cleanup_register(new_cond->pool,
@@ -113,22 +113,22 @@ APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
APR_DECLARE(apr_status_t) apr_thread_cond_wait(apr_thread_cond_t *cond,
apr_thread_mutex_t *mutex)
{
- apr_status_t stat;
+ apr_status_t rv;
- stat = pthread_cond_wait(cond->cond, &mutex->mutex);
+ rv = pthread_cond_wait(cond->cond, &mutex->mutex);
#ifdef PTHREAD_SETS_ERRNO
- if (stat) {
- stat = errno;
+ if (rv) {
+ rv = errno;
}
#endif
- return stat;
+ return rv;
}
APR_DECLARE(apr_status_t) apr_thread_cond_timedwait(apr_thread_cond_t *cond,
apr_thread_mutex_t *mutex,
apr_interval_time_t timeout)
{
- apr_status_t stat;
+ apr_status_t rv;
apr_time_t then;
struct timespec abstime;
@@ -136,53 +136,53 @@ APR_DECLARE(apr_status_t) apr_thread_cond_timedwait(apr_thread_cond_t *cond,
abstime.tv_sec = then / APR_USEC_PER_SEC;
abstime.tv_nsec = (then % APR_USEC_PER_SEC) * 1000; /* nanoseconds */
- stat = pthread_cond_timedwait(cond->cond, &mutex->mutex, &abstime);
+ rv = pthread_cond_timedwait(cond->cond, &mutex->mutex, &abstime);
#ifdef PTHREAD_SETS_ERRNO
- if (stat) {
- stat = errno;
+ if (rv) {
+ rv = errno;
}
#endif
- if (ETIMEDOUT == stat) {
+ if (ETIMEDOUT == rv) {
return APR_TIMEUP;
}
- return stat;
+ return rv;
}
APR_DECLARE(apr_status_t) apr_thread_cond_signal(apr_thread_cond_t *cond)
{
- apr_status_t stat;
+ apr_status_t rv;
- stat = pthread_cond_signal(cond->cond);
+ rv = pthread_cond_signal(cond->cond);
#ifdef PTHREAD_SETS_ERRNO
- if (stat) {
- stat = errno;
+ if (rv) {
+ rv = errno;
}
#endif
- return stat;
+ return rv;
}
APR_DECLARE(apr_status_t) apr_thread_cond_broadcast(apr_thread_cond_t *cond)
{
- apr_status_t stat;
+ apr_status_t rv;
- stat = pthread_cond_broadcast(cond->cond);
+ rv = pthread_cond_broadcast(cond->cond);
#ifdef PTHREAD_SETS_ERRNO
- if (stat) {
- stat = errno;
+ if (rv) {
+ rv = errno;
}
#endif
- return stat;
+ return rv;
}
APR_DECLARE(apr_status_t) apr_thread_cond_destroy(apr_thread_cond_t *cond)
{
- apr_status_t stat;
- if ((stat = thread_cond_cleanup(cond)) == APR_SUCCESS) {
+ apr_status_t rv;
+ if ((rv = thread_cond_cleanup(cond)) == APR_SUCCESS) {
apr_pool_cleanup_kill(cond->pool, cond, thread_cond_cleanup);
return APR_SUCCESS;
}
- return stat;
+ return rv;
}
APR_POOL_IMPLEMENT_ACCESSOR(thread_cond)