summaryrefslogtreecommitdiff
path: root/ovsdb/transaction.c
diff options
context:
space:
mode:
authorBen Warren <ben@skyportsystems.com>2016-03-25 14:10:22 -0700
committerBen Pfaff <blp@ovn.org>2016-03-30 13:04:32 -0700
commit417e7e66e1217ab984ebb058fb3b469e77e216fc (patch)
tree664ef5b9af86bfdaa212dec9dd3162746a3df890 /ovsdb/transaction.c
parentb19bab5b207da94c2f71b8df25fcfe47ee778a29 (diff)
downloadopenvswitch-417e7e66e1217ab984ebb058fb3b469e77e216fc.tar.gz
list: Rename all functions in list.h with ovs_ prefix.
This attempts to prevent namespace collisions with other list libraries Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovsdb/transaction.c')
-rw-r--r--ovsdb/transaction.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ovsdb/transaction.c b/ovsdb/transaction.c
index 725c6f552..84ccfa3e7 100644
--- a/ovsdb/transaction.c
+++ b/ovsdb/transaction.c
@@ -102,7 +102,7 @@ ovsdb_txn_create(struct ovsdb *db)
{
struct ovsdb_txn *txn = xmalloc(sizeof *txn);
txn->db = db;
- list_init(&txn->txn_tables);
+ ovs_list_init(&txn->txn_tables);
ds_init(&txn->comment);
return txn;
}
@@ -110,7 +110,7 @@ ovsdb_txn_create(struct ovsdb *db)
static void
ovsdb_txn_free(struct ovsdb_txn *txn)
{
- ovs_assert(list_is_empty(&txn->txn_tables));
+ ovs_assert(ovs_list_is_empty(&txn->txn_tables));
ds_destroy(&txn->comment);
free(txn);
}
@@ -448,9 +448,9 @@ add_weak_ref(struct ovsdb_txn *txn,
dst = ovsdb_txn_row_modify(txn, dst);
- if (!list_is_empty(&dst->dst_refs)) {
+ if (!ovs_list_is_empty(&dst->dst_refs)) {
/* Omit duplicates. */
- weak = CONTAINER_OF(list_back(&dst->dst_refs),
+ weak = CONTAINER_OF(ovs_list_back(&dst->dst_refs),
struct ovsdb_weak_ref, dst_node);
if (weak->src == src) {
return;
@@ -459,8 +459,8 @@ add_weak_ref(struct ovsdb_txn *txn,
weak = xmalloc(sizeof *weak);
weak->src = src;
- list_push_back(&dst->dst_refs, &weak->dst_node);
- list_push_back(&src->src_refs, &weak->src_node);
+ ovs_list_push_back(&dst->dst_refs, &weak->dst_node);
+ ovs_list_push_back(&src->src_refs, &weak->src_node);
}
static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
@@ -774,7 +774,7 @@ ovsdb_txn_commit_(struct ovsdb_txn *txn, bool durable)
if (error) {
return OVSDB_WRAP_BUG("can't happen", error);
}
- if (list_is_empty(&txn->txn_tables)) {
+ if (ovs_list_is_empty(&txn->txn_tables)) {
ovsdb_txn_abort(txn);
return NULL;
}
@@ -883,7 +883,7 @@ ovsdb_txn_create_txn_table(struct ovsdb_txn *txn, struct ovsdb_table *table)
for (i = 0; i < table->schema->n_indexes; i++) {
hmap_init(&txn_table->txn_indexes[i]);
}
- list_push_back(&txn->txn_tables, &txn_table->node);
+ ovs_list_push_back(&txn->txn_tables, &txn_table->node);
}
return table->txn_table;
}
@@ -1024,7 +1024,7 @@ ovsdb_txn_table_destroy(struct ovsdb_txn_table *txn_table)
txn_table->table->txn_table = NULL;
hmap_destroy(&txn_table->txn_rows);
- list_remove(&txn_table->node);
+ ovs_list_remove(&txn_table->node);
free(txn_table);
}