The queue is a simple array of strings of size defined by:
#define MAX_PROCESSING_OOPS 10
but the add_to / remove_from functions were hard coded to wrap the tail and
head array indices at 100.
Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
free(processing_queue[head]);
processing_queue[head++] = NULL;
- if (head == 100)
+ if (head == MAX_PROCESSING_OOPS)
head = 0;
}
g_hash_table_insert(core_status.processing_oops, c2, c2);
processing_queue[tail++] = fp;
- if (tail == 100)
+ if (tail == MAX_PROCESSING_OOPS)
tail = 0;
pthread_mutex_unlock(&processing_queue_mtx);