Fixed more warnings from GCC 4.4.x.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1116 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
8c6f1ef338
commit
219d8d1ec9
|
@ -64,10 +64,7 @@
|
|||
* @extends ThreadsQueue
|
||||
*/
|
||||
typedef struct {
|
||||
Thread *p_next; /**< Next @p Thread in the ready list.*/
|
||||
Thread *p_prev; /**< Previous @p Thread in the ready
|
||||
list.*/
|
||||
/* End of the fields shared with the ThreadsQueue structure. */
|
||||
ThreadsQueue r_queue; /**< Next @p Threads queue.*/
|
||||
tprio_t r_prio; /**< This field must be initialized to
|
||||
zero.*/
|
||||
/* End of the fields shared with the Thread structure.*/
|
||||
|
|
|
@ -37,7 +37,7 @@ ReadyList rlist;
|
|||
*/
|
||||
void scheduler_init(void) {
|
||||
|
||||
queue_init(&rlist);
|
||||
queue_init(&rlist.r_queue);
|
||||
rlist.r_prio = NOPRIO;
|
||||
#if CH_USE_ROUNDROBIN
|
||||
rlist.r_preempt = CH_TIME_QUANTUM;
|
||||
|
@ -82,7 +82,7 @@ void chSchGoSleepS(tstate_t newstate) {
|
|||
Thread *otp;
|
||||
|
||||
(otp = currp)->p_state = newstate;
|
||||
(currp = fifo_remove((void *)&rlist))->p_state = PRCURR;
|
||||
(currp = fifo_remove(&rlist.r_queue))->p_state = PRCURR;
|
||||
#if CH_USE_ROUNDROBIN
|
||||
rlist.r_preempt = CH_TIME_QUANTUM;
|
||||
#endif
|
||||
|
@ -194,7 +194,7 @@ void chSchDoRescheduleI(void) {
|
|||
|
||||
Thread *otp = currp;
|
||||
/* pick the first thread from the ready queue and makes it current */
|
||||
(currp = fifo_remove((void *)&rlist))->p_state = PRCURR;
|
||||
(currp = fifo_remove(&rlist.r_queue))->p_state = PRCURR;
|
||||
chSchReadyI(otp);
|
||||
#if CH_USE_ROUNDROBIN
|
||||
rlist.r_preempt = CH_TIME_QUANTUM;
|
||||
|
@ -211,7 +211,7 @@ void chSchDoRescheduleI(void) {
|
|||
void chSchRescheduleS(void) {
|
||||
/* first thread in the runnable queue has higher priority than the running
|
||||
* thread? */
|
||||
if (firstprio(&rlist) > currp->p_prio)
|
||||
if (firstprio(&rlist.r_queue) > currp->p_prio)
|
||||
chSchDoRescheduleI();
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ void chSchRescheduleS(void) {
|
|||
* @retval FALSE if a reschedulation is not required.
|
||||
*/
|
||||
bool_t chSchRescRequiredI(void) {
|
||||
tprio_t p1 = firstprio(&rlist);
|
||||
tprio_t p1 = firstprio(&rlist.r_queue);
|
||||
tprio_t p2 = currp->p_prio;
|
||||
#if CH_USE_ROUNDROBIN
|
||||
/* If the running thread has not reached its time quantum, reschedule only
|
||||
|
|
Loading…
Reference in New Issue