Logo Search packages:      
Sourcecode: libnl2 version File versions  Download package

void nl_cache_remove ( struct nl_object *  obj  ) 

Removes an object from a cache.

  • obj Object to remove from its cache
Removes the object obj from the cache it is assigned to, since an object can only be assigned to one cache at a time, the cache must ne be passed along with it.

Definition at line 378 of file cache.c.

References nl_object_put().

Referenced by nl_cache_clear(), nl_cache_move(), and nl_object_free().

{
      struct nl_cache *cache = obj->ce_cache;

      if (cache == NULL)
            return;

      nl_list_del(&obj->ce_list);
      obj->ce_cache = NULL;
      nl_object_put(obj);
      cache->c_nitems--;

      NL_DBG(1, "Deleted %p from cache %p <%s>.\n",
             obj, cache, nl_cache_name(cache));
}


Generated by  Doxygen 1.6.0   Back to index