From 31fae7b93d7aa94b7b3fcbfdf101328230ea6302 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 24 Jun 2010 12:13:48 +0200 Subject: bugfix: "$ActionExecOnlyWhenPreviousIsSuspended on" was broken Note that, as it looks, the directive was already broken in previous v5 versions. So while I solved what looked like a (intentional) regression from the performance tuning, I actually solved a previous regression as well ;) I have also added new test cases to the testbench in order to capture such problems in the future. This version does now look pretty good in shape. --- runtime/batch.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'runtime/batch.h') diff --git a/runtime/batch.h b/runtime/batch.h index 80621631..b555fc2a 100644 --- a/runtime/batch.h +++ b/runtime/batch.h @@ -174,4 +174,23 @@ batchInit(batch_t *pBatch, int maxElem) { finalize_it: RETiRet; } + + +/* primarily a helper for debug purposes, get human-readble name of state */ +static inline char * +batchState2String(batch_state_t state) { + switch(state) { + case BATCH_STATE_RDY: + return "BATCH_STATE_RDY"; + case BATCH_STATE_BAD: + return "BATCH_STATE_BAD"; + case BATCH_STATE_SUB: + return "BATCH_STATE_SUB"; + case BATCH_STATE_COMM: + return "BATCH_STATE_COMM"; + case BATCH_STATE_DISC: + return "BATCH_STATE_DISC"; + } + return "ERROR, batch state not known!"; +} #endif /* #ifndef BATCH_H_INCLUDED */ -- cgit