Add a couple KERNEL_ASSERTs to check queue fullness when extra checks are enabled.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29164 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2011-01-29 15:03:09 +00:00
parent 5606719499
commit ab50ed7171

View file

@ -617,6 +617,9 @@ void queue_post(struct event_queue *q, long id, intptr_t data)
wr = q->write++ & QUEUE_LENGTH_MASK;
KERNEL_ASSERT((q->write - q->read) <= QUEUE_LENGTH,
"queue_post ovf q=%08lX", (long)q);
q->events[wr].id = id;
q->events[wr].data = data;
@ -643,6 +646,9 @@ intptr_t queue_send(struct event_queue *q, long id, intptr_t data)
wr = q->write++ & QUEUE_LENGTH_MASK;
KERNEL_ASSERT((q->write - q->read) <= QUEUE_LENGTH,
"queue_send ovf q=%08lX", (long)q);
q->events[wr].id = id;
q->events[wr].data = data;