aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-08-28 16:10:40 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-08-28 16:10:40 +0000
commit219d8d1ec90984f9b00dcbad070895577172aee0 (patch)
treeae19f65c2d7c5102e26707a3105dc2d6e9c8903b /os
parent8c6f1ef33876c873ddfac7297879a8f8c69fb46e (diff)
downloadChibiOS-219d8d1ec90984f9b00dcbad070895577172aee0.tar.gz
ChibiOS-219d8d1ec90984f9b00dcbad070895577172aee0.tar.bz2
ChibiOS-219d8d1ec90984f9b00dcbad070895577172aee0.zip
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-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/kernel/include/scheduler.h7
-rw-r--r--os/kernel/src/chschd.c10
2 files changed, 7 insertions, 10 deletions
diff --git a/os/kernel/include/scheduler.h b/os/kernel/include/scheduler.h
index 648cb7bc5..d29b92ae6 100644
--- a/os/kernel/include/scheduler.h
+++ b/os/kernel/include/scheduler.h
@@ -64,13 +64,10 @@
* @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. */
+ /* End of the fields shared with the Thread structure.*/
#if CH_USE_ROUNDROBIN
cnt_t r_preempt; /**< Round robin counter.*/
#endif
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c
index 3ba8b29e9..76464d603 100644
--- a/os/kernel/src/chschd.c
+++ b/os/kernel/src/chschd.c
@@ -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