wrap around check not working - disable it for now

r1121 | dcl | 2006-10-09 12:21:46 +1000 (Mon, 09 Oct 2006) | 2 lines
This commit is contained in:
Douglas Clowes
2006-10-09 12:21:46 +10:00
parent 7a070c3332
commit 816e49012b

View File

@@ -284,6 +284,12 @@ int cntr_start(COUNTER *cp)
cp->state = counter_running;
cp->previous_time = cp->current_time;
HCTR_TEST(hctr_read(cp->private_data, &cp->count64));
SAMPLE* sp = cur_sample(cp);
sp->timestamp = cp->current_time;
sp->counter_value = cp->current_count;
SAMPLE* psp = prv_sample(cp, 1);
psp->timestamp = cp->current_time;
psp->counter_value = cp->current_count;
make_report(cp);
if (pp->output_line == 1)
value = 1;
@@ -419,6 +425,7 @@ static void cntr_test_term(COUNTER* cp)
/*
* decremented to or through terminal
*/
// TODO FIXME improve wraparound handling
if ((sp->counter_value <= pp->terminal_count &&
psp->counter_value > pp->terminal_count) ||
(sp->counter_value > psp->counter_value &&
@@ -432,10 +439,17 @@ static void cntr_test_term(COUNTER* cp)
/*
* incremented to or through terminal
*/
if ((sp->counter_value >= pp->terminal_count &&
psp->counter_value < pp->terminal_count) ||
// TODO FIXME improve wraparound handling
if (
#if 1
sp->counter_value >= pp->terminal_count
#else
(sp->counter_value >= pp->terminal_count &&
psp->counter_value < pp->terminal_count) ||
(sp->counter_value < psp->counter_value &&
psp->counter_value > pp->terminal_count))
psp->counter_value > pp->terminal_count)
#endif
)
{
cp->terminal_due = true;
}