optimize code

This commit is contained in:
Henson
2022-01-26 21:39:06 +08:00
parent 9b44535740
commit 500d26c257
5 changed files with 26 additions and 59 deletions
+2 -8
View File
@@ -99,10 +99,7 @@ rt_err_t rt_data_queue_push(struct rt_data_queue *queue,
RT_ASSERT(queue->magic == DATAQUEUE_MAGIC);
/* current context checking */
if (timeout != 0)
{
RT_DEBUG_SCHEDULER_AVAILABLE;
}
RT_DEBUG_SCHEDULER_AVAILABLE(timeout != 0);
result = RT_EOK;
thread = rt_thread_self();
@@ -221,10 +218,7 @@ rt_err_t rt_data_queue_pop(struct rt_data_queue *queue,
RT_ASSERT(size != RT_NULL);
/* current context checking */
if (timeout != 0)
{
RT_DEBUG_SCHEDULER_AVAILABLE;
}
RT_DEBUG_SCHEDULER_AVAILABLE(timeout != 0);
result = RT_EOK;
thread = rt_thread_self();