FreeBSD/contrib/subversion/subversion/libsvn_repos/repos.c
/* There is, at present, nothing within the direct responsibility
   of libsvn_repos which requires locking.  For historical compatibility
   reasons, the BDB libsvn_fs backend does not do its own locking, expecting
   libsvn_repos to do the locking for it.  Here we take care of that
   backend-specific requirement.
   The kind of lock is controlled by EXCLUSIVE and NONBLOCKING.
   The lock is scoped to POOL.  */
There is, at present, nothing within the direct responsibility
of libsvn_repos which requires locking.  For historical compatibility
reasons, the BDB libsvn_fs backend does not do its own locking, expecting
libsvn_repos to do the locking for it.  Here we take care of that
backend-specific requirement.
The kind of lock is controlled by EXCLUSIVE and NONBLOCKING.
The lock is scoped to POOL.
There is at present nothing within the direct responsibility of libsvn_repos which requires locking . For historical compatibility reasons the BDB libsvn_fs backend does not do its own locking expecting libsvn_repos to do the locking for it . Here we take care of that backend - specific requirement . The kind of lock is controlled by EXCLUSIVE and NONBLOCKING . The lock is scoped to POOL .
static svn_error_t *
lock_repos(svn_repos_t *repos,
           svn_boolean_t exclusive,
           svn_boolean_t nonblocking,
           apr_pool_t *pool)
{
  if (strcmp(repos->fs_type, SVN_FS_TYPE_BDB) == 0)
    {
      svn_error_t *err;
      const char *lockfile_path = svn_repos_db_lockfile(repos, pool);
      err = svn_io_file_lock2(lockfile_path, exclusive, nonblocking, pool);
      if (err != NULL && APR_STATUS_IS_EAGAIN(err->apr_err))
        return svn_error_trace(err);
      SVN_ERR_W(err, _("Error opening db lockfile"));
    }
  return SVN_NO_ERROR;
}
static svn_error_t * lock_repos ( svn_repos_t * repos , svn_boolean_t exclusive , svn_boolean_t nonblocking , apr_pool_t * pool ) { if ( strcmp ( repos -> fs_type , SVN_FS_TYPE_BDB ) == 0 ) { svn_error_t * err ; const char * lockfile_path = svn_repos_db_lockfile ( repos , pool ) ; err = svn_io_file_lock2 ( lockfile_path , exclusive , nonblocking , pool ) ; if ( err != NULL && APR_STATUS_IS_EAGAIN ( err -> apr_err ) ) return svn_error_trace ( err ) ; SVN_ERR_W ( err , _ ( " " ) ) ; } return SVN_NO_ERROR ; }
There is, at present, nothing within the direct responsibility
of libsvn_repos which requires locking.
There is at present nothing within the direct responsibility of libsvn_repos which requires locking .