File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,7 @@ extern _st_eventsys_t *_st_eventsys;
299
299
#define _ST_DEL_IOQ (_pq ) ST_REMOVE_LINK(&_pq.links)
300
300
301
301
#define _ST_ADD_RUNQ (_thr ) ST_APPEND_LINK(&(_thr)->links, &_ST_RUNQ)
302
+ #define _ST_INSERT_RUNQ (_thr ) ST_INSERT_LINK(&(_thr)->links, &_ST_RUNQ)
302
303
#define _ST_DEL_RUNQ (_thr ) ST_REMOVE_LINK(&(_thr)->links)
303
304
304
305
#define _ST_ADD_SLEEPQ (_thr , _timeout ) _st_add_sleep_q(_thr, _timeout)
Original file line number Diff line number Diff line change @@ -548,7 +548,8 @@ void _st_vp_check_clock(void)
548
548
/* Make thread runnable */
549
549
ST_ASSERT (!(thread -> flags & _ST_FL_IDLE_THREAD ));
550
550
thread -> state = _ST_ST_RUNNABLE ;
551
- _ST_ADD_RUNQ (thread );
551
+ // Insert at the head of RunQ, to execute timer first.
552
+ _ST_INSERT_RUNQ (thread );
552
553
}
553
554
}
554
555
You can’t perform that action at this time.
0 commit comments