#include "ovsdb-data.h"
#include "ovsdb-error.h"
#include "ovsdb-idl-provider.h"
+#include "poll-loop.h"
#include "shash.h"
#include "util.h"
free(txn);
}
+void
+ovsdb_idl_txn_wait(const struct ovsdb_idl_txn *txn)
+{
+ if (txn->status != TXN_INCOMPLETE) {
+ poll_immediate_wake();
+ }
+}
+
static struct json *
where_uuid_equals(const struct uuid *uuid)
{
struct ovsdb_idl_txn *ovsdb_idl_txn_create(struct ovsdb_idl *);
void ovsdb_idl_txn_destroy(struct ovsdb_idl_txn *);
+void ovsdb_idl_txn_wait(const struct ovsdb_idl_txn *);
enum ovsdb_idl_txn_status ovsdb_idl_txn_commit(struct ovsdb_idl_txn *);
void ovsdb_idl_txn_abort(struct ovsdb_idl_txn *);
while ((status = ovsdb_idl_txn_commit(txn)) == TXN_INCOMPLETE) {
ovsdb_idl_run(idl);
ovsdb_idl_wait(idl);
+ ovsdb_idl_txn_wait(txn);
poll_block();
}
printf("%03d: commit, status=%s\n",
while ((status = ovsdb_idl_txn_commit(txn)) == TXN_INCOMPLETE) {
ovsdb_idl_run(idl);
ovsdb_idl_wait(idl);
+ ovsdb_idl_txn_wait(txn);
poll_block();
}
ovsdb_idl_txn_destroy(txn);