FreeBSD/contrib/subversion/subversion/libsvn_subr/cache-membuffer.c
/* If locking is supported for CACHE, release the current lock
 * (read or write).  Return ERR upon success.
 */
If locking is supported for CACHE, release the current lock
(read or write).  Return ERR upon success.
If locking is supported for CACHE release the current lock ( read or write ) . Return ERR upon success .
static svn_error_t *
unlock_cache(svn_membuffer_t *cache, svn_error_t *err)
{
#if (APR_HAS_THREADS && USE_SIMPLE_MUTEX)
  return svn_mutex__unlock(cache->lock, err);
#elif (APR_HAS_THREADS && !USE_SIMPLE_MUTEX)
  if (cache->lock)
  {
    apr_status_t status = apr_thread_rwlock_unlock(cache->lock);
    if (err)
      return err;
    if (status)
      return svn_error_wrap_apr(status, _("Can't unlock cache mutex"));
  }
  return err;
#else
  return err;
#endif
}
static svn_error_t * unlock_cache ( svn_membuffer_t * cache , svn_error_t * err ) { #if ( APR_HAS_THREADS && USE_SIMPLE_MUTEX ) return svn_mutex__unlock ( cache -> lock , err ) ; #elif ( APR_HAS_THREADS && ! USE_SIMPLE_MUTEX ) if ( cache -> lock ) { apr_status_t status = apr_thread_rwlock_unlock ( cache -> lock ) ; if ( err ) return err ; if ( status ) return svn_error_wrap_apr ( status , _ ( " " ) ) ; } return err ; #else return err ; #endif }
If locking is supported for CACHE, release the current lock
 (read or write).
If locking is supported for CACHE release the current lock ( read or write ) .