summaryrefslogtreecommitdiff
path: root/nuttx/sched/sched_addprioritized.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-27 21:17:21 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-27 21:17:21 +0000
commit148cde5e982950ad5836fa96baa466de842e1c14 (patch)
treebf737b367b91c5da81345eb21016b07400d7a72f /nuttx/sched/sched_addprioritized.c
parentf6b81a790c28d7d36d9de33810df5270c1ebbfd7 (diff)
downloadpx4-nuttx-148cde5e982950ad5836fa96baa466de842e1c14.tar.gz
px4-nuttx-148cde5e982950ad5836fa96baa466de842e1c14.tar.bz2
px4-nuttx-148cde5e982950ad5836fa96baa466de842e1c14.zip
Finally, a clean SDCC compile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@20 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/sched_addprioritized.c')
-rw-r--r--nuttx/sched/sched_addprioritized.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/nuttx/sched/sched_addprioritized.c b/nuttx/sched/sched_addprioritized.c
index 54e792048..9b0c89e81 100644
--- a/nuttx/sched/sched_addprioritized.c
+++ b/nuttx/sched/sched_addprioritized.c
@@ -91,10 +91,10 @@
* match the state associated with the list.
************************************************************/
-boolean sched_addprioritized(_TCB *tcb, dq_queue_t *list)
+boolean sched_addprioritized(FAR _TCB *tcb, NEAR dq_queue_t *list)
{
- _TCB *next;
- _TCB *prev;
+ FAR _TCB *next;
+ FAR _TCB *prev;
ubyte sched_priority = tcb->sched_priority;
boolean ret = FALSE;
@@ -106,7 +106,7 @@ boolean sched_addprioritized(_TCB *tcb, dq_queue_t *list)
* Each is list is maintained in ascending sched_priority order.
*/
- for (next = (_TCB*)list->head;
+ for (next = (FAR _TCB*)list->head;
(next && sched_priority <= next->sched_priority);
next = next->flink);
@@ -119,15 +119,15 @@ boolean sched_addprioritized(_TCB *tcb, dq_queue_t *list)
{
/* The tcb goes at the end of the list. */
- prev = (_TCB*)list->tail;
+ prev = (FAR _TCB*)list->tail;
if (!prev)
{
/* Special case: The list is empty */
tcb->flink = NULL;
tcb->blink = NULL;
- list->head = (dq_entry_t*)tcb;
- list->tail = (dq_entry_t*)tcb;
+ list->head = (FAR dq_entry_t*)tcb;
+ list->tail = (FAR dq_entry_t*)tcb;
ret = TRUE;
}
else
@@ -137,22 +137,22 @@ boolean sched_addprioritized(_TCB *tcb, dq_queue_t *list)
tcb->flink = NULL;
tcb->blink = prev;
prev->flink = tcb;
- list->tail = (dq_entry_t*)tcb;
+ list->tail = (FAR dq_entry_t*)tcb;
}
}
else
{
/* The tcb goes just before next */
- prev = (_TCB*)next->blink;
+ prev = (FAR _TCB*)next->blink;
if (!prev)
{
/* Special case: Insert at the head of the list */
- tcb->flink = next;
- tcb->blink = NULL;
+ tcb->flink = next;
+ tcb->blink = NULL;
next->blink = tcb;
- list->head = (dq_entry_t*)tcb;
+ list->head = (FAR dq_entry_t*)tcb;
ret = TRUE;
}
else
@@ -168,3 +168,4 @@ boolean sched_addprioritized(_TCB *tcb, dq_queue_t *list)
return ret;
}
+