FreeBSD/contrib/subversion/subversion/libsvn_subr/root_pools.c
/* Return a currently unused connection pool in *POOL. If no such pool
 * exists, create a new root pool and return that in *POOL.
 */
Return a currently unused connection pool in *POOL. If no such pool
exists, create a new root pool and return that in *POOL.
Return a currently unused connection pool in * POOL . If no such pool exists create a new root pool and return that in * POOL .
static svn_error_t *
acquire_pool_internal(apr_pool_t **pool,
                      svn_root_pools__t *pools)
{
  SVN_ERR(svn_mutex__lock(pools->mutex));
  *pool = pools->unused_pools->nelts
        ? *(apr_pool_t **)apr_array_pop(pools->unused_pools)
        : apr_allocator_owner_get(svn_pool_create_allocator(FALSE));
  SVN_ERR(svn_mutex__unlock(pools->mutex, SVN_NO_ERROR));
  return SVN_NO_ERROR;
}
static svn_error_t * acquire_pool_internal ( apr_pool_t * * pool , svn_root_pools__t * pools ) { SVN_ERR ( svn_mutex__lock ( pools -> mutex ) ) ; * pool = pools -> unused_pools -> nelts ? * ( apr_pool_t * * ) apr_array_pop ( pools -> unused_pools ) : apr_allocator_owner_get ( svn_pool_create_allocator ( FALSE ) ) ; SVN_ERR ( svn_mutex__unlock ( pools -> mutex , SVN_NO_ERROR ) ) ; return SVN_NO_ERROR ; }
Return a currently unused connection pool in *POOL.
Return a currently unused connection pool in * POOL .