summaryrefslogtreecommitdiff
path: root/nuttx/arch/sim
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-16 23:23:46 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-16 23:23:46 +0000
commitcef4fec60cb7f31f81f887fcfd729be41662abb1 (patch)
tree0d46ddbbeaa56d21bde1660d97c4e34c31539f11 /nuttx/arch/sim
parent471b50c5f8f0f49ce8abfb8f0085d05cfe32edaa (diff)
downloadpx4-nuttx-cef4fec60cb7f31f81f887fcfd729be41662abb1.tar.gz
px4-nuttx-cef4fec60cb7f31f81f887fcfd729be41662abb1.tar.bz2
px4-nuttx-cef4fec60cb7f31f81f887fcfd729be41662abb1.zip
Clean-up from big switch to stdint/stdbool
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2362 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/sim')
-rw-r--r--nuttx/arch/sim/src/up_createstack.c2
-rw-r--r--nuttx/arch/sim/src/up_reprioritizertr.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/nuttx/arch/sim/src/up_createstack.c b/nuttx/arch/sim/src/up_createstack.c
index 76f13f1e7..03426ade2 100644
--- a/nuttx/arch/sim/src/up_createstack.c
+++ b/nuttx/arch/sim/src/up_createstack.c
@@ -96,7 +96,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
/* Allocate the memory for the stack */
- uint32 *stack_alloc_ptr = (uint32_t*)kmalloc(adj_stack_size);
+ uint32_t *stack_alloc_ptr = (uint32_t*)kmalloc(adj_stack_size);
if (stack_alloc_ptr)
{
/* This is the address of the last word in the allocation */
diff --git a/nuttx/arch/sim/src/up_reprioritizertr.c b/nuttx/arch/sim/src/up_reprioritizertr.c
index a11bada6d..a7ffb137d 100644
--- a/nuttx/arch/sim/src/up_reprioritizertr.c
+++ b/nuttx/arch/sim/src/up_reprioritizertr.c
@@ -90,9 +90,14 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
/* Verify that the caller is sane */
if (tcb->task_state < FIRST_READY_TO_RUN_STATE ||
- tcb->task_state > LAST_READY_TO_RUN_STATE ||
- priority < SCHED_PRIORITY_MIN ||
- priority > SCHED_PRIORITY_MAX)
+ tcb->task_state > LAST_READY_TO_RUN_STATE
+#if SCHED_PRIORITY_MIN > UINT8_MIN
+ || priority < SCHED_PRIORITY_MIN
+#endif
+#if SCHED_PRIORITY_MAX < UINT8_MAX
+ || priority > SCHED_PRIORITY_MAX
+#endif
+ )
{
PANIC(OSERR_BADREPRIORITIZESTATE);
}