Merge the change in RISC-V branch.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2019-12-03 NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
* chopstx.c (chx_timer_expired): When no timer, explicitly call
|
||||
chx_systick_reload with 0.
|
||||
|
||||
2019-12-03 NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
* example-cdc/Makefile (ARCH): Define.
|
||||
|
||||
12
chopstx.c
12
chopstx.c
@@ -387,7 +387,9 @@ chx_timer_expired (void)
|
||||
uint16_t prio = 0; /* Use uint16_t here. */
|
||||
|
||||
chx_spin_lock (&q_timer.lock);
|
||||
if ((tp = (struct chx_thread *)ll_pop (&q_timer.q)))
|
||||
if (!(tp = (struct chx_thread *)ll_pop (&q_timer.q)))
|
||||
chx_systick_reload (0);
|
||||
else
|
||||
{
|
||||
uint32_t next_tick = tp->v;
|
||||
|
||||
@@ -399,7 +401,9 @@ chx_timer_expired (void)
|
||||
if ((uint16_t)tp->prio > prio)
|
||||
prio = (uint16_t)tp->prio;
|
||||
|
||||
if (!ll_empty (&q_timer.q))
|
||||
if (ll_empty (&q_timer.q))
|
||||
chx_systick_reload (0);
|
||||
else
|
||||
{
|
||||
struct chx_thread *tp_next;
|
||||
|
||||
@@ -419,7 +423,9 @@ chx_timer_expired (void)
|
||||
prio = (uint16_t)tp->prio;
|
||||
}
|
||||
|
||||
if (!ll_empty (&q_timer.q))
|
||||
if (ll_empty (&q_timer.q))
|
||||
chx_systick_reload (0);
|
||||
else
|
||||
chx_set_timer ((struct chx_thread *)&q_timer.q, next_tick);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user