FreeBSD/contrib/subversion/subversion/libsvn_subr/utf.c
/* Put back NODE into the xlate handle cache for use by other calls.
   If there is no global cache, store the handle in POOL.
   Ignore errors related to locking/unlocking the mutex. */
Put back NODE into the xlate handle cache for use by other calls.
If there is no global cache, store the handle in POOL.
Ignore errors related to locking/unlocking the mutex.
Put back NODE into the xlate handle cache for use by other calls . If there is no global cache store the handle in POOL . Ignore errors related to locking / unlocking the mutex .
static svn_error_t *
put_xlate_handle_node(xlate_handle_node_t *node,
                      const char *userdata_key,
                      apr_pool_t *pool)
{
  assert(node->next == NULL);
  if (!userdata_key)
    return SVN_NO_ERROR;
  if (xlate_handle_hash)
    {
      if (userdata_key == SVN_UTF_NTOU_XLATE_HANDLE)
        node = atomic_swap(&xlat_ntou_static_handle, node);
      else if (userdata_key == SVN_UTF_UTON_XLATE_HANDLE)
        node = atomic_swap(&xlat_uton_static_handle, node);
      if (node == NULL)
        return SVN_NO_ERROR;
      SVN_MUTEX__WITH_LOCK(xlate_handle_mutex,
                           put_xlate_handle_node_internal(node,
                                                          userdata_key));
    }
  else
    {
      apr_pool_userdata_set(node, userdata_key, apr_pool_cleanup_null, pool);
    }
  return SVN_NO_ERROR;
}
static svn_error_t * put_xlate_handle_node ( xlate_handle_node_t * node , const char * userdata_key , apr_pool_t * pool ) { assert ( node -> next == NULL ) ; if ( ! userdata_key ) return SVN_NO_ERROR ; if ( xlate_handle_hash ) { if ( userdata_key == SVN_UTF_NTOU_XLATE_HANDLE ) node = atomic_swap ( & xlat_ntou_static_handle , node ) ; else if ( userdata_key == SVN_UTF_UTON_XLATE_HANDLE ) node = atomic_swap ( & xlat_uton_static_handle , node ) ; if ( node == NULL ) return SVN_NO_ERROR ; SVN_MUTEX__WITH_LOCK ( xlate_handle_mutex , put_xlate_handle_node_internal ( node , userdata_key ) ) ; } else { apr_pool_userdata_set ( node , userdata_key , apr_pool_cleanup_null , pool ) ; } return SVN_NO_ERROR ; }
Put back NODE into the xlate handle cache for use by other calls.
Put back NODE into the xlate handle cache for use by other calls .
/* push previous global node to the hash */ /* 1st level: global, static items */ /* Store it in the per-pool cache. */