mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
sched/hrtimer: Rename the HRTIMER_CANCEL_SYNC_DELAY timeout.
This commit renamed the HRTIMER_CANCEL_SYNC_DELAY_MS to HRTIMER_CANCEL_SYNC_DELAY_US. Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
committed by
GUIDINGLI
parent
f1b355f118
commit
281f9fc0c0
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
/* Delay used while waiting for a running hrtimer callback to complete */
|
/* Delay used while waiting for a running hrtimer callback to complete */
|
||||||
|
|
||||||
#define HRTIMER_CANCEL_SYNC_DELAY_MS 5
|
#define HRTIMER_CANCEL_SYNC_DELAY_US CONFIG_USEC_PER_TICK
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
@@ -513,7 +513,7 @@ static inline_function void hrtimer_wait(FAR hrtimer_t *timer)
|
|||||||
{
|
{
|
||||||
if (!up_interrupt_context() && !is_idle_task(this_task()))
|
if (!up_interrupt_context() && !is_idle_task(this_task()))
|
||||||
{
|
{
|
||||||
nxsched_msleep(HRTIMER_CANCEL_SYNC_DELAY_MS);
|
nxsched_usleep(HRTIMER_CANCEL_SYNC_DELAY_US);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Otherwise, spin-wait is enough. */
|
/* Otherwise, spin-wait is enough. */
|
||||||
|
|||||||
Reference in New Issue
Block a user