File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -543,6 +543,8 @@ rt_err_t rt_thread_delay_util(rt_tick_t *tick, rt_tick_t inc_tick)
543543 register rt_base_t level ;
544544 struct rt_thread * thread ;
545545
546+ RT_ASSERT (tick != RT_NULL );
547+
546548 /* set to current thread */
547549 thread = rt_thread_self ();
548550 RT_ASSERT (thread != RT_NULL );
@@ -567,9 +569,6 @@ rt_err_t rt_thread_delay_util(rt_tick_t *tick, rt_tick_t inc_tick)
567569
568570 rt_schedule ();
569571
570- /* get the wakeup tick */
571- * tick = rt_tick_get ();
572-
573572 /* clear error number of this thread to RT_EOK */
574573 if (thread -> error == - RT_ETIMEOUT )
575574 {
@@ -581,6 +580,9 @@ rt_err_t rt_thread_delay_util(rt_tick_t *tick, rt_tick_t inc_tick)
581580 rt_hw_interrupt_enable (level );
582581 }
583582
583+ /* get the wakeup tick */
584+ * tick = rt_tick_get ();
585+
584586 return RT_EOK ;
585587}
586588RTM_EXPORT (rt_thread_delay_util );
You can’t perform that action at this time.
0 commit comments