Merge pull request #3862 from qiyongzhong0/fix_dataqueue

fix dataqueue, limit queue size to usable values (2,4,8,16...) to avo…
This commit is contained in:
Bernard Xiong 2020-08-31 08:53:28 +08:00 committed by GitHub
commit 3626325277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -28,6 +28,7 @@ rt_data_queue_init(struct rt_data_queue *queue,
void (*evt_notify)(struct rt_data_queue *queue, rt_uint32_t event)) void (*evt_notify)(struct rt_data_queue *queue, rt_uint32_t event))
{ {
RT_ASSERT(queue != RT_NULL); RT_ASSERT(queue != RT_NULL);
RT_ASSERT((0x10000 % size) == 0);
queue->evt_notify = evt_notify; queue->evt_notify = evt_notify;