• Home
  • Raw
  • Download

Lines Matching full:cache

3  * lib/cache_mngt.c	Cache Management
25 * #include <netlink/cache.h>
31 #include <netlink/cache.h>
38 * @name Cache Operations Sets
55 * @arg ops Cache operations
64 * @arg ops Cache operations
72 * Lookup cache operations by name
73 * @arg name name of the cache type
78 * @return The cache operations or NULL if not found.
92 * Lookup cache operations by name
93 * @arg name name of the cache type
95 * @note The reference counter of the returned cache operation is incremented
98 * @return The cache operations or NULL if not found.
130 * Associate protocol and message type to cache operations
139 * @return The cache operations or NULL if no match found.
153 * Associate protocol and message type to cache operations
157 * Searches the registered cache operations for a matching protocol
160 * @note The reference counter of the returned cache operation is incremented
163 * @return The cache operations or NULL if no no match was found.
178 * Lookup message type cache association
179 * @arg ops cache operations
183 * cache operations.
186 * to the lifetime of the underlying cache operations.
215 * Call a function for each registered cache operation
231 * @arg ops Cache ops
234 * The cache operation flags will be derived to all caches allocates
235 * based on this set of cache operations.
245 * Register a set of cache operations
246 * @arg ops cache operations
249 * a certain cache type.
272 NL_DBG(1, "Registered cache operations %s\n", ops->co_name); in nl_cache_mngt_register()
278 * Unregister a set of cache operations
279 * @arg ops cache operations
282 * cache operations is no longer available. The
283 * specified cache operations must have been registered
309 NL_DBG(1, "Unregistered cache operations %s\n", ops->co_name); in nl_cache_mngt_unregister()
321 * @name Global Cache Provisioning/Requiring
326 * Provide a cache for global use
327 * @arg cache cache to provide
329 * Offers the specified cache to be used by other modules.
330 * Only one cache per type may be shared at a time,
333 void nl_cache_mngt_provide(struct nl_cache *cache) in nl_cache_mngt_provide() argument
339 ops = cache_ops_lookup_for_obj(cache->c_ops->co_obj_ops); in nl_cache_mngt_provide()
343 nl_cache_get(cache); in nl_cache_mngt_provide()
346 * Hold a reference to the cache operations to ensure the in nl_cache_mngt_provide()
347 * ops don't go away while we use it to store the cache pointer. in nl_cache_mngt_provide()
352 ops->co_major_cache = cache; in nl_cache_mngt_provide()
359 * Unprovide a cache for global use
360 * @arg cache cache to unprovide
362 * Cancels the offer to use a cache globally. The
363 * cache will no longer be returned via lookups but
366 void nl_cache_mngt_unprovide(struct nl_cache *cache) in nl_cache_mngt_unprovide() argument
372 ops = cache_ops_lookup_for_obj(cache->c_ops->co_obj_ops); in nl_cache_mngt_unprovide()
375 else if (ops->co_major_cache == cache) { in nl_cache_mngt_unprovide()
387 struct nl_cache *cache = NULL; in __nl_cache_mngt_require() local
391 cache = ops->co_major_cache; in __nl_cache_mngt_require()
395 return cache; in __nl_cache_mngt_require()
399 * Return cache previously provided via nl_cache_mngt_provide()
400 * @arg name Name of cache to lookup
407 * @return Pointer to cache or NULL if none registered
411 struct nl_cache *cache; in nl_cache_mngt_require() local
413 if (!(cache = __nl_cache_mngt_require(name))) in nl_cache_mngt_require()
416 "%s cache to be used for internal lookups.\nSee the " in nl_cache_mngt_require()
419 return cache; in nl_cache_mngt_require()
423 * Return cache previously provided via nl_cache_mngt_provide()
424 * @arg name Name of cache to lookup
426 * @note The reference counter of the returned cache is incremented
429 * @return Pointer to cache or NULL if none registered
433 struct nl_cache *cache; in nl_cache_mngt_require_safe() local
435 if ((cache = nl_cache_mngt_require(name))) in nl_cache_mngt_require_safe()
436 nl_cache_get(cache); in nl_cache_mngt_require_safe()
438 return cache; in nl_cache_mngt_require_safe()