mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-23 11:09:28 -05:00
Add uncrustify github workflow (#659)
* Add uncrustify github workflow * Fix exclusion pattern * fix find expression * exclude uncrustify files * Uncrustify common demo and test files * exlude white space checking files * Fix EOL whitespace checker * Remove whitespaces from EOL * Fix space at EOL * Fix find spaces at EOL Co-authored-by: Archit Aggarwal <architag@amazon.com>
This commit is contained in:
parent
dd80d615b5
commit
ae92d8c6ee
191 changed files with 17540 additions and 17102 deletions
|
|
@ -34,46 +34,52 @@
|
|||
#include "cbmc.h"
|
||||
|
||||
#ifndef LOCK_BOUND
|
||||
#define LOCK_BOUND 4
|
||||
#define LOCK_BOUND 4
|
||||
#endif
|
||||
|
||||
#ifndef QUEUE_PEEK_BOUND
|
||||
#define QUEUE_PEEK_BOUND 4
|
||||
#define QUEUE_PEEK_BOUND 4
|
||||
#endif
|
||||
|
||||
QueueHandle_t xQueue;
|
||||
|
||||
|
||||
/* This method is called to initialize pxTimeOut.
|
||||
Setting up the data structure is not interesting for the proof,
|
||||
but the harness uses it to model a release
|
||||
on the queue after first check. */
|
||||
void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut ){
|
||||
xQueue-> uxMessagesWaiting = nondet_BaseType_t();
|
||||
* Setting up the data structure is not interesting for the proof,
|
||||
* but the harness uses it to model a release
|
||||
* on the queue after first check. */
|
||||
void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut )
|
||||
{
|
||||
xQueue->uxMessagesWaiting = nondet_BaseType_t();
|
||||
}
|
||||
|
||||
void harness(){
|
||||
xQueue = xUnconstrainedQueueBoundedItemSize(10);
|
||||
void harness()
|
||||
{
|
||||
xQueue = xUnconstrainedQueueBoundedItemSize( 10 );
|
||||
|
||||
//Initialise the tasksStubs
|
||||
vInitTaskCheckForTimeOut(0, QUEUE_PEEK_BOUND - 1);
|
||||
/*Initialise the tasksStubs */
|
||||
vInitTaskCheckForTimeOut( 0, QUEUE_PEEK_BOUND - 1 );
|
||||
|
||||
TickType_t xTicksToWait;
|
||||
if(xState == taskSCHEDULER_SUSPENDED){
|
||||
xTicksToWait = 0;
|
||||
}
|
||||
TickType_t xTicksToWait;
|
||||
|
||||
if(xQueue){
|
||||
__CPROVER_assume(xQueue->cTxLock < LOCK_BOUND - 1);
|
||||
__CPROVER_assume(xQueue->cRxLock < LOCK_BOUND - 1);
|
||||
if( xState == taskSCHEDULER_SUSPENDED )
|
||||
{
|
||||
xTicksToWait = 0;
|
||||
}
|
||||
|
||||
void *pvItemToQueue = pvPortMalloc(xQueue->uxItemSize);
|
||||
if( xQueue )
|
||||
{
|
||||
__CPROVER_assume( xQueue->cTxLock < LOCK_BOUND - 1 );
|
||||
__CPROVER_assume( xQueue->cRxLock < LOCK_BOUND - 1 );
|
||||
|
||||
/* In case malloc fails as this is otherwise an invariant violation. */
|
||||
if(!pvItemToQueue){
|
||||
xQueue->uxItemSize = 0;
|
||||
}
|
||||
void * pvItemToQueue = pvPortMalloc( xQueue->uxItemSize );
|
||||
|
||||
xQueuePeek( xQueue, pvItemToQueue, xTicksToWait );
|
||||
}
|
||||
/* In case malloc fails as this is otherwise an invariant violation. */
|
||||
if( !pvItemToQueue )
|
||||
{
|
||||
xQueue->uxItemSize = 0;
|
||||
}
|
||||
|
||||
xQueuePeek( xQueue, pvItemToQueue, xTicksToWait );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue