diff options
Diffstat (limited to 'components/drivers/ipc/dataqueue.c')
| -rw-r--r-- | components/drivers/ipc/dataqueue.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/drivers/ipc/dataqueue.c b/components/drivers/ipc/dataqueue.c index 4e52662c44..94e7b087c5 100644 --- a/components/drivers/ipc/dataqueue.c +++ b/components/drivers/ipc/dataqueue.c @@ -98,6 +98,9 @@ rt_err_t rt_data_queue_push(struct rt_data_queue *queue, RT_ASSERT(queue != RT_NULL); RT_ASSERT(queue->magic == DATAQUEUE_MAGIC); + /* current context checking */ + RT_DEBUG_SCHEDULER_AVAILABLE(timeout != 0); + result = RT_EOK; thread = rt_thread_self(); @@ -112,9 +115,6 @@ rt_err_t rt_data_queue_push(struct rt_data_queue *queue, goto __exit; } - /* current context checking */ - RT_DEBUG_NOT_IN_INTERRUPT; - /* reset thread error number */ thread->error = RT_EOK; @@ -217,6 +217,9 @@ rt_err_t rt_data_queue_pop(struct rt_data_queue *queue, RT_ASSERT(data_ptr != RT_NULL); RT_ASSERT(size != RT_NULL); + /* current context checking */ + RT_DEBUG_SCHEDULER_AVAILABLE(timeout != 0); + result = RT_EOK; thread = rt_thread_self(); @@ -230,9 +233,6 @@ rt_err_t rt_data_queue_pop(struct rt_data_queue *queue, goto __exit; } - /* current context checking */ - RT_DEBUG_NOT_IN_INTERRUPT; - /* reset thread error number */ thread->error = RT_EOK; |
