FreeBSD/contrib/subversion/subversion/libsvn_subr/cache-membuffer.c
/* If locking is supported for CACHE, acquire a read lock for it.
 */
If locking is supported for CACHE, acquire a read lock for it.
If locking is supported for CACHE acquire a read lock for it .
static svn_error_t *
read_lock_cache(svn_membuffer_t *cache)
{
#if (APR_HAS_THREADS && USE_SIMPLE_MUTEX)
  return svn_mutex__lock(cache->lock);
#elif (APR_HAS_THREADS && !USE_SIMPLE_MUTEX)
  if (cache->lock)
  {
    apr_status_t status = apr_thread_rwlock_rdlock(cache->lock);
    if (status)
      return svn_error_wrap_apr(status, _("Can't lock cache mutex"));
  }
  return SVN_NO_ERROR;
#else
  return SVN_NO_ERROR;
#endif
}
static svn_error_t * read_lock_cache ( svn_membuffer_t * cache ) { #if ( APR_HAS_THREADS && USE_SIMPLE_MUTEX ) return svn_mutex__lock ( cache -> lock ) ; #elif ( APR_HAS_THREADS && ! USE_SIMPLE_MUTEX ) if ( cache -> lock ) { apr_status_t status = apr_thread_rwlock_rdlock ( cache -> lock ) ; if ( status ) return svn_error_wrap_apr ( status , _ ( " " ) ) ; } return SVN_NO_ERROR ; #else return SVN_NO_ERROR ; #endif }
If locking is supported for CACHE, acquire a read lock for it.
If locking is supported for CACHE acquire a read lock for it .