change poll behavior
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2016-04-24 Niibe Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
|
* chopstx.c (chx_snooze): Wait forever when it's POLL and usec==0.
|
||||||
|
|
||||||
2016-04-22 Niibe Yutaka <gniibe@fsij.org>
|
2016-04-22 Niibe Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
* example-fs-bb48/first-pages.c: Rename from reset.c and merge
|
* example-fs-bb48/first-pages.c: Rename from reset.c and merge
|
||||||
|
|||||||
16
chopstx.c
16
chopstx.c
@@ -1104,8 +1104,20 @@ chx_snooze (uint32_t state, uint32_t *usec_p)
|
|||||||
|
|
||||||
if (usec == 0)
|
if (usec == 0)
|
||||||
{
|
{
|
||||||
chx_cpu_sched_unlock ();
|
if (state == THREAD_WAIT_TIME)
|
||||||
return -1;
|
{
|
||||||
|
chx_cpu_sched_unlock ();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (running->flag_sched_rr)
|
||||||
|
chx_timer_dequeue (running);
|
||||||
|
|
||||||
|
running->state = state;
|
||||||
|
r = chx_sched (CHX_SLEEP);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
usec0 = (usec > MAX_USEC_FOR_TIMER) ? MAX_USEC_FOR_TIMER: usec;
|
usec0 = (usec > MAX_USEC_FOR_TIMER) ? MAX_USEC_FOR_TIMER: usec;
|
||||||
|
|||||||
Reference in New Issue
Block a user