File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed
Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -441,11 +441,21 @@ ovsdb_idl_clear(struct ovsdb_idl *db)
441441 * ovsdb_idl_get_seqno(). */
442442void
443443ovsdb_idl_run (struct ovsdb_idl * idl )
444+ {
445+ ovsdb_idl_run_until (idl , 0 );
446+ }
447+
448+ void
449+ ovsdb_idl_run_until (struct ovsdb_idl * idl , long long deadline )
444450{
445451 ovs_assert (!idl -> txn );
446452
447453 struct ovs_list events ;
448- ovsdb_cs_run (idl -> cs , & events );
454+ if (deadline ) {
455+ ovsdb_cs_run_until (idl -> cs , & events , deadline );
456+ } else {
457+ ovsdb_cs_run (idl -> cs , & events );
458+ }
449459
450460 struct ovsdb_cs_event * event ;
451461 LIST_FOR_EACH_POP (event , list_node , & events ) {
@@ -4374,7 +4384,17 @@ ovsdb_idl_loop_destroy(struct ovsdb_idl_loop *loop)
43744384struct ovsdb_idl_txn *
43754385ovsdb_idl_loop_run (struct ovsdb_idl_loop * loop )
43764386{
4377- ovsdb_idl_run (loop -> idl );
4387+ return ovsdb_idl_loop_run_until (loop , 0 );
4388+ }
4389+
4390+ struct ovsdb_idl_txn *
4391+ ovsdb_idl_loop_run_until (struct ovsdb_idl_loop * loop , long long deadline )
4392+ {
4393+ if (deadline ) {
4394+ ovsdb_idl_run_until (loop -> idl , deadline );
4395+ } else {
4396+ ovsdb_idl_run (loop -> idl );
4397+ }
43784398
43794399 /* See if the 'committing_txn' succeeded in the meantime. */
43804400 if (loop -> committing_txn && loop -> committing_txn -> status == TXN_SUCCESS ) {
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ void ovsdb_idl_destroy(struct ovsdb_idl *);
7474void ovsdb_idl_set_leader_only (struct ovsdb_idl * , bool leader_only );
7575
7676void ovsdb_idl_run (struct ovsdb_idl * );
77+ void ovsdb_idl_run_until (struct ovsdb_idl * , long long );
7778void ovsdb_idl_wait (struct ovsdb_idl * );
7879
7980void ovsdb_idl_get_memory_usage (struct ovsdb_idl * , struct simap * usage );
@@ -409,6 +410,8 @@ struct ovsdb_idl_loop {
409410
410411void ovsdb_idl_loop_destroy (struct ovsdb_idl_loop * );
411412struct ovsdb_idl_txn * ovsdb_idl_loop_run (struct ovsdb_idl_loop * );
413+ struct ovsdb_idl_txn * ovsdb_idl_loop_run_until (struct ovsdb_idl_loop * ,
414+ long long );
412415int ovsdb_idl_loop_commit_and_wait (struct ovsdb_idl_loop * );
413416
414417/* Conditional Replication
You can’t perform that action at this time.
0 commit comments