Skip to content

Commit 3626325

Browse files
authored
Merge pull request #3862 from qiyongzhong0/fix_dataqueue
fix dataqueue, limit queue size to usable values (2,4,8,16...) to avo…
2 parents eeb3bf7 + c16c5b9 commit 3626325

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/drivers/src/dataqueue.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ rt_data_queue_init(struct rt_data_queue *queue,
2828
void (*evt_notify)(struct rt_data_queue *queue, rt_uint32_t event))
2929
{
3030
RT_ASSERT(queue != RT_NULL);
31+
RT_ASSERT((0x10000 % size) == 0);
3132

3233
queue->evt_notify = evt_notify;
3334

0 commit comments

Comments
 (0)