mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
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
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user