FreeBSD/contrib/subversion/subversion/libsvn_fs_x/caching.c
/* This function sets / registers the required callbacks for a given
 * not transaction-specific CACHE object in FS, if CACHE is not NULL.
 *
 * All these svn_cache__t instances shall be handled uniformly. Unless
 * ERROR_HANDLER is NULL, register it for the given CACHE in FS.
 */
This function sets / registers the required callbacks for a given
not transaction-specific CACHE object in FS, if CACHE is not NULL.

All these svn_cache__t instances shall be handled uniformly. Unless
ERROR_HANDLER is NULL, register it for the given CACHE in FS.
This function sets / registers the required callbacks for a given not transaction - specific CACHE object in FS if CACHE is not NULL . All these svn_cache__t instances shall be handled uniformly . Unless ERROR_HANDLER is NULL register it for the given CACHE in FS .
static svn_error_t *
init_callbacks(svn_cache__t *cache,
               svn_fs_t *fs,
               svn_cache__error_handler_t error_handler,
               apr_pool_t *pool)
{
  if (cache != NULL)
    {
#ifdef SVN_DEBUG_CACHE_DUMP_STATS
      dump_cache_baton_t *baton;
      baton = apr_palloc(pool, sizeof(*baton));
      baton->pool = pool;
      baton->cache = cache;
      apr_pool_cleanup_register(pool,
                                baton,
                                dump_cache_statistics,
                                apr_pool_cleanup_null);
#endif
      if (error_handler)
        SVN_ERR(svn_cache__set_error_handler(cache,
                                             error_handler,
                                             fs,
                                             pool));
    }
  return SVN_NO_ERROR;
}
static svn_error_t * init_callbacks ( svn_cache__t * cache , svn_fs_t * fs , svn_cache__error_handler_t error_handler , apr_pool_t * pool ) { if ( cache != NULL ) { #ifdef SVN_DEBUG_CACHE_DUMP_STATS dump_cache_baton_t * baton ; baton = apr_palloc ( pool , sizeof ( * baton ) ) ; baton -> pool = pool ; baton -> cache = cache ; apr_pool_cleanup_register ( pool , baton , dump_cache_statistics , apr_pool_cleanup_null ) ; #endif if ( error_handler ) SVN_ERR ( svn_cache__set_error_handler ( cache , error_handler , fs , pool ) ) ; } return SVN_NO_ERROR ; }
This function sets / registers the required callbacks for a given
 not transaction-specific CACHE object in FS, if CACHE is not NULL.
This function sets / registers the required callbacks for a given not transaction - specific CACHE object in FS if CACHE is not NULL .
/* schedule printing the access statistics upon pool cleanup,
       * i.e. end of FSX session.
       */