X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fovsdb-idl.h;h=e7ae6f1d4daa1c155fda32176a81b8ce4feb95d7;hb=0e70cdcb8ddeb20417e682fd63769f9d16601b07;hp=302abd6a6be724e97a7338e3044aaa125b559a4c;hpb=ef73f86cd4f7ec0cd2d3f9526167a0d0f6be4f63;p=openvswitch diff --git a/lib/ovsdb-idl.h b/lib/ovsdb-idl.h index 302abd6a..e7ae6f1d 100644 --- a/lib/ovsdb-idl.h +++ b/lib/ovsdb-idl.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010 Nicira Networks. +/* Copyright (c) 2009, 2010, 2011 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,6 +50,10 @@ void ovsdb_idl_destroy(struct ovsdb_idl *); bool ovsdb_idl_run(struct ovsdb_idl *); void ovsdb_idl_wait(struct ovsdb_idl *); +void ovsdb_idl_set_lock(struct ovsdb_idl *, const char *lock_name); +bool ovsdb_idl_has_lock(const struct ovsdb_idl *); +bool ovsdb_idl_is_lock_contended(const struct ovsdb_idl *); + unsigned int ovsdb_idl_get_seqno(const struct ovsdb_idl *); bool ovsdb_idl_has_ever_connected(const struct ovsdb_idl *); void ovsdb_idl_force_reconnect(struct ovsdb_idl *); @@ -105,10 +109,13 @@ const struct ovsdb_datum *ovsdb_idl_get(const struct ovsdb_idl_row *, const struct ovsdb_idl_column *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type); + +bool ovsdb_idl_row_is_synthetic(const struct ovsdb_idl_row *); /* Transactions. */ enum ovsdb_idl_txn_status { + TXN_UNCOMMITTED, /* Not yet committed or aborted. */ TXN_UNCHANGED, /* Transaction didn't include any changes. */ TXN_INCOMPLETE, /* Commit in progress, please wait. */ TXN_ABORTED, /* ovsdb_idl_txn_abort() called. */ @@ -116,6 +123,7 @@ enum ovsdb_idl_txn_status { TXN_TRY_AGAIN, /* Commit failed because a "verify" operation * reported an inconsistency, due to a network * problem, or other transient failure. */ + TXN_NOT_LOCKED, /* Server hasn't given us the lock yet. */ TXN_ERROR /* Commit failed due to a hard error. */ };