Updated stack depth requirements in preconditions to match precondition of pxPortInitialiseStack

This commit is contained in:
Tobias Reinhard 2022-11-02 14:16:29 -04:00
parent 249d220ed7
commit 0e84d8906f
3 changed files with 6 additions and 4 deletions

View file

@ -1315,7 +1315,7 @@ static void prvYieldForTask( TCB_t * pxTCB,
UBaseType_t uxPriority,
TaskHandle_t * const pxCreatedTask )
/*@ requires usStackDepth * sizeof( StackType_t ) < UINTPTR_MAX &*&
usStackDepth > 2 &*&
usStackDepth > 18 &*&
// We assume that macro `configMAX_TASK_NAME_LEN` evaluates to 16.
chars(pcName, 16, _);
@*/
@ -1445,7 +1445,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
/*@ requires uninit_TCB_p(pxNewTCB, ?stackSize) &*&
stackSize == ulStackDepth * sizeof(StackType_t) &*&
stackSize <= UINTPTR_MAX &*&
ulStackDepth > 2 &*&
ulStackDepth > 18 &*&
// We assume that macro `configMAX_TASK_NAME_LEN` evaluates to 16.
chars(pcName, 16, _);
@*/

View file

@ -10084,6 +10084,7 @@ predicate uninit_TCB_p(TCB_t * tcb, int stackSize) =
tcb->uxPriority |-> _ &*&
tcb->pxStack |-> ?stackPtr &*&
stackPtr != 0 &*&
(char*) stackPtr + stackSize <= (char*) UINTPTR_MAX &*&
chars_((char*) stackPtr, stackSize, _) &*&
malloc_block_chars((char*) stackPtr, stackSize) &*&
@ -11208,7 +11209,7 @@ static void prvYieldForTask( TCB_t * pxTCB,
UBaseType_t uxPriority,
TaskHandle_t * const pxCreatedTask )
/*@ requires usStackDepth * sizeof( StackType_t ) < UINTPTR_MAX &*&
usStackDepth > 2 &*&
usStackDepth > 18 &*&
// We assume that macro `configMAX_TASK_NAME_LEN` evaluates to 16.
chars(pcName, 16, _);
@*/
@ -11290,7 +11291,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
/*@ requires uninit_TCB_p(pxNewTCB, ?stackSize) &*&
stackSize == ulStackDepth * sizeof(StackType_t) &*&
stackSize <= UINTPTR_MAX &*&
ulStackDepth > 2 &*&
ulStackDepth > 18 &*&
// We assume that macro `configMAX_TASK_NAME_LEN` evaluates to 16.
chars(pcName, 16, _);
@*/

View file

@ -20,6 +20,7 @@ predicate uninit_TCB_p(TCB_t * tcb, int stackSize) =
tcb->uxPriority |-> _ &*&
tcb->pxStack |-> ?stackPtr &*&
stackPtr != 0 &*&
(char*) stackPtr + stackSize <= (char*) UINTPTR_MAX &*&
chars_((char*) stackPtr, stackSize, _) &*&
malloc_block_chars((char*) stackPtr, stackSize) &*&