apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aa...@apache.org
Subject cvs commit: apr/locks/unix thread_cond.c
Date Mon, 18 Feb 2002 01:21:19 GMT
aaron       02/02/17 17:21:19

  Modified:    locks/unix thread_cond.c
  Log:
  Change the name of the 'stat' variable so we don't shadow the libc symbol.
  
  Revision  Changes    Path
  1.5       +33 -33    apr/locks/unix/thread_cond.c
  
  Index: thread_cond.c
  ===================================================================
  RCS file: /home/cvs/apr/locks/unix/thread_cond.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- thread_cond.c	12 Oct 2001 01:05:02 -0000	1.4
  +++ thread_cond.c	18 Feb 2002 01:21:19 -0000	1.5
  @@ -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 @@
           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_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 @@
       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)
  
  
  

Mime
View raw message