~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/objagg.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
  2 /* Copyright (c) 2018 Mellanox Technologies. All rights reserved */
  3 
  4 #ifndef _OBJAGG_H
  5 #define _OBJAGG_H
  6 
  7 struct objagg_ops {
  8         size_t obj_size;
  9         bool (*delta_check)(void *priv, const void *parent_obj,
 10                             const void *obj);
 11         void * (*delta_create)(void *priv, void *parent_obj, void *obj);
 12         void (*delta_destroy)(void *priv, void *delta_priv);
 13         void * (*root_create)(void *priv, void *obj, unsigned int root_id);
 14 #define OBJAGG_OBJ_ROOT_ID_INVALID UINT_MAX
 15         void (*root_destroy)(void *priv, void *root_priv);
 16 };
 17 
 18 struct objagg;
 19 struct objagg_obj;
 20 struct objagg_hints;
 21 
 22 const void *objagg_obj_root_priv(const struct objagg_obj *objagg_obj);
 23 const void *objagg_obj_delta_priv(const struct objagg_obj *objagg_obj);
 24 const void *objagg_obj_raw(const struct objagg_obj *objagg_obj);
 25 
 26 struct objagg_obj *objagg_obj_get(struct objagg *objagg, void *obj);
 27 void objagg_obj_put(struct objagg *objagg, struct objagg_obj *objagg_obj);
 28 struct objagg *objagg_create(const struct objagg_ops *ops,
 29                              struct objagg_hints *hints, void *priv);
 30 void objagg_destroy(struct objagg *objagg);
 31 
 32 struct objagg_obj_stats {
 33         unsigned int user_count;
 34         unsigned int delta_user_count; /* includes delta object users */
 35 };
 36 
 37 struct objagg_obj_stats_info {
 38         struct objagg_obj_stats stats;
 39         struct objagg_obj *objagg_obj; /* associated object */
 40         bool is_root;
 41 };
 42 
 43 struct objagg_stats {
 44         unsigned int root_count;
 45         unsigned int stats_info_count;
 46         struct objagg_obj_stats_info stats_info[];
 47 };
 48 
 49 const struct objagg_stats *objagg_stats_get(struct objagg *objagg);
 50 void objagg_stats_put(const struct objagg_stats *objagg_stats);
 51 
 52 enum objagg_opt_algo_type {
 53         OBJAGG_OPT_ALGO_SIMPLE_GREEDY,
 54 };
 55 
 56 struct objagg_hints *objagg_hints_get(struct objagg *objagg,
 57                                       enum objagg_opt_algo_type opt_algo_type);
 58 void objagg_hints_put(struct objagg_hints *objagg_hints);
 59 const struct objagg_stats *
 60 objagg_hints_stats_get(struct objagg_hints *objagg_hints);
 61 
 62 #endif
 63 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php