Commit 57e03073 authored by Philip Carns's avatar Philip Carns
Browse files

finish reverse computation in test harness

parent f947e07d
...@@ -41,6 +41,8 @@ struct client_msg ...@@ -41,6 +41,8 @@ struct client_msg
enum client_event_type event_type; enum client_event_type event_type;
int barrier_count; int barrier_count;
struct codes_workload_op op_rc; struct codes_workload_op op_rc;
int target_barrier_count_rc;
int current_barrier_count_rc;
}; };
static void handle_client_op_loop_rev_event( static void handle_client_op_loop_rev_event(
...@@ -196,9 +198,8 @@ static void handle_client_op_barrier_rev_event( ...@@ -196,9 +198,8 @@ static void handle_client_op_barrier_rev_event(
client_msg * m, client_msg * m,
tw_lp * lp) tw_lp * lp)
{ {
/* TODO: fill this in */ ns->current_barrier_count = m->current_barrier_count_rc;
assert(0); ns->target_barrier_count = m->target_barrier_count_rc;
return; return;
} }
...@@ -239,6 +240,10 @@ static void handle_client_op_barrier_event( ...@@ -239,6 +240,10 @@ static void handle_client_op_barrier_event(
client_msg *m_out; client_msg *m_out;
int i; int i;
/* save barrier counters for reverse computation */
m->current_barrier_count_rc = ns->current_barrier_count;
m->target_barrier_count_rc = ns->target_barrier_count;
assert(ns->target_barrier_count == 0 || ns->target_barrier_count == m->barrier_count); assert(ns->target_barrier_count == 0 || ns->target_barrier_count == m->barrier_count);
if(ns->target_barrier_count == 0) if(ns->target_barrier_count == 0)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment