diff options
Diffstat (limited to 'nuttx/arch/sim')
-rw-r--r-- | nuttx/arch/sim/src/up_createstack.c | 2 | ||||
-rw-r--r-- | nuttx/arch/sim/src/up_reprioritizertr.c | 11 |
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); } |