diff options
Diffstat (limited to 'lib/ovsdb-data.h')
-rw-r--r-- | lib/ovsdb-data.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/ovsdb-data.h b/lib/ovsdb-data.h index ba5d179a6..dcb620513 100644 --- a/lib/ovsdb-data.h +++ b/lib/ovsdb-data.h @@ -146,6 +146,8 @@ struct ovsdb_datum { unsigned int n; /* Number of 'keys' and 'values'. */ union ovsdb_atom *keys; /* Each of the ovsdb_type's 'key_type'. */ union ovsdb_atom *values; /* Each of the ovsdb_type's 'value_type'. */ + unsigned int *refcnt; /* Number of copies with the same + * 'keys' and 'values'. */ }; #define OVSDB_DATUM_INITIALIZER { 0, NULL, NULL } @@ -155,22 +157,21 @@ void ovsdb_datum_init_default(struct ovsdb_datum *, const struct ovsdb_type *); bool ovsdb_datum_is_default(const struct ovsdb_datum *, const struct ovsdb_type *); const struct ovsdb_datum *ovsdb_datum_default(const struct ovsdb_type *); -void ovsdb_datum_clone(struct ovsdb_datum *, const struct ovsdb_datum *, - const struct ovsdb_type *); +void ovsdb_datum_clone(struct ovsdb_datum *, const struct ovsdb_datum *); void ovsdb_datum_destroy(struct ovsdb_datum *, const struct ovsdb_type *); +void ovsdb_datum_unshare(struct ovsdb_datum *, const struct ovsdb_type *); void ovsdb_datum_swap(struct ovsdb_datum *, struct ovsdb_datum *); /* Checking and maintaining invariants. */ struct ovsdb_error *ovsdb_datum_sort(struct ovsdb_datum *, - enum ovsdb_atomic_type key_type) + const struct ovsdb_type *type) OVS_WARN_UNUSED_RESULT; void ovsdb_datum_sort_assert(struct ovsdb_datum *, - enum ovsdb_atomic_type key_type); + const struct ovsdb_type *type); size_t ovsdb_datum_sort_unique(struct ovsdb_datum *, - enum ovsdb_atomic_type key_type, - enum ovsdb_atomic_type value_type); + const struct ovsdb_type *type); struct ovsdb_error *ovsdb_datum_check_constraints( const struct ovsdb_datum *, const struct ovsdb_type *) |