FreeBSD/contrib/subversion/subversion/libsvn_subr/cache-membuffer.c
/* Move ENTRY in CACHE from L1 to L2.
 */
Move ENTRY in CACHE from L1 to L2.
Move ENTRY in CACHE from L1 to L2 .
static void
promote_entry(svn_membuffer_t *cache, entry_t *entry)
{
  apr_uint32_t idx = get_index(cache, entry);
  apr_size_t size = ALIGN_VALUE(entry->size);
  assert(get_cache_level(cache, entry) == &cache->l1);
  assert(idx == cache->l1.next);
  memmove(cache->data + cache->l2.current_data,
          cache->data + entry->offset,
          size);
  entry->offset = cache->l2.current_data;
  cache->l2.current_data += size;
  unchain_entry(cache, &cache->l1, entry, idx);
  chain_entry(cache, &cache->l2, entry, idx);
}
static void promote_entry ( svn_membuffer_t * cache , entry_t * entry ) { apr_uint32_t idx = get_index ( cache , entry ) ; apr_size_t size = ALIGN_VALUE ( entry -> size ) ; assert ( get_cache_level ( cache , entry ) == & cache -> l1 ) ; assert ( idx == cache -> l1 . next ) ; memmove ( cache -> data + cache -> l2 . current_data , cache -> data + entry -> offset , size ) ; entry -> offset = cache -> l2 . current_data ; cache -> l2 . current_data += size ; unchain_entry ( cache , & cache -> l1 , entry , idx ) ; chain_entry ( cache , & cache -> l2 , entry , idx ) ; }
Move ENTRY in CACHE from L1 to L2.
Move ENTRY in CACHE from L1 to L2 .
/* copy item from the current location in L1 to the start of L2's
   * insertion window */ /* The insertion position is now directly behind this entry.
   */ /* remove ENTRY from chain of L1 entries and put it into L2
   */