mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-15 09:17:44 -04: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
|
@ -29,8 +29,9 @@
|
|||
static void prvCopyDataFromQueue( Queue_t * const pxQueue,
|
||||
void * const pvBuffer )
|
||||
/*@requires queue(pxQueue, ?Storage, ?N, ?M, ?W, ?R, ?K, ?is_locked, ?abs) &*& 0 < K &*& chars(pvBuffer, M, _);@*/
|
||||
|
||||
/*@ensures queue_after_prvCopyDataFromQueue(pxQueue, Storage, N, M, W, (R+1)%N, K, is_locked, abs) &*&
|
||||
chars(pvBuffer, M, head(abs));@*/
|
||||
* chars(pvBuffer, M, head(abs));@*/
|
||||
{
|
||||
if( pxQueue->uxItemSize != ( UBaseType_t ) 0 )
|
||||
{
|
||||
|
@ -46,44 +47,48 @@ static void prvCopyDataFromQueue( Queue_t * const pxQueue,
|
|||
else
|
||||
{
|
||||
/*@{
|
||||
div_lt(R+1, N, M); // now we know R+1 < N
|
||||
mod_lt(R+1, N); // so, R+1 == (R+1)%N
|
||||
note(pxQueue->u.xQueue.pcReadFrom == Storage + ((R + 1) * M));
|
||||
note( Storage + ((R + 1) * M) == Storage + (((R + 1) % N) * M));
|
||||
}@*/
|
||||
* div_lt(R+1, N, M); // now we know R+1 < N
|
||||
* mod_lt(R+1, N); // so, R+1 == (R+1)%N
|
||||
* note(pxQueue->u.xQueue.pcReadFrom == Storage + ((R + 1) * M));
|
||||
* note( Storage + ((R + 1) * M) == Storage + (((R + 1) % N) * M));
|
||||
* }@*/
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
/*@mod_plus(R+1, K, N);@*/
|
||||
/*@mod_mod(R+1, N);@*/
|
||||
/*@split_element(Storage, N, M, (R+1)%N);@*/
|
||||
|
||||
/*@assert
|
||||
buffer(Storage, (R+1)%N, M, ?prefix) &*&
|
||||
chars(Storage + ((R+1)%N) * M, M, ?element) &*&
|
||||
buffer(Storage + ((R+1)%N + 1) * M, (N-1-(R+1)%N), M, ?suffix);@*/
|
||||
#ifdef VERIFAST /*< void cast of unused return value */
|
||||
memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( size_t ) pxQueue->uxItemSize );
|
||||
#else
|
||||
( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */
|
||||
#endif
|
||||
* buffer(Storage, (R+1)%N, M, ?prefix) &*&
|
||||
* chars(Storage + ((R+1)%N) * M, M, ?element) &*&
|
||||
* buffer(Storage + ((R+1)%N + 1) * M, (N-1-(R+1)%N), M, ?suffix);@*/
|
||||
#ifdef VERIFAST /*< void cast of unused return value */
|
||||
memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( size_t ) pxQueue->uxItemSize );
|
||||
#else
|
||||
( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */
|
||||
#endif
|
||||
|
||||
/*@{
|
||||
combine_list_no_change(prefix, element, suffix, (R+1)%N, contents);
|
||||
join_element(Storage, N, M, (R+1)%N);
|
||||
length_take(K, contents);
|
||||
take_length_eq(K, rotate_left((R+1)%N, contents), abs);
|
||||
deq_value_lemma(K, (R+1)%N, contents, abs);
|
||||
}@*/
|
||||
* combine_list_no_change(prefix, element, suffix, (R+1)%N, contents);
|
||||
* join_element(Storage, N, M, (R+1)%N);
|
||||
* length_take(K, contents);
|
||||
* take_length_eq(K, rotate_left((R+1)%N, contents), abs);
|
||||
* deq_value_lemma(K, (R+1)%N, contents, abs);
|
||||
* }@*/
|
||||
}
|
||||
}
|
||||
|
||||
void caller_reinstates_queue_predicate( Queue_t * const pxQueue,
|
||||
void * const pvBuffer )
|
||||
|
||||
/*@requires queue(pxQueue, ?Storage, ?N, ?M, ?W, ?R, ?K, ?is_locked, ?abs) &*&
|
||||
0 < K &*&
|
||||
chars(pvBuffer, M, _);@*/
|
||||
* 0 < K &*&
|
||||
* chars(pvBuffer, M, _);@*/
|
||||
|
||||
/*@ensures
|
||||
queue(pxQueue, Storage, N, M, W, (R+1)%N, K-1, is_locked, tail(abs)) &*&
|
||||
chars(pvBuffer, M, head(abs));@*/
|
||||
* queue(pxQueue, Storage, N, M, W, (R+1)%N, K-1, is_locked, tail(abs)) &*&
|
||||
* chars(pvBuffer, M, head(abs));@*/
|
||||
{
|
||||
prvCopyDataFromQueue( pxQueue, pvBuffer );
|
||||
/*@open queue_after_prvCopyDataFromQueue(pxQueue, Storage, N, M, W, (R+1)%N, K, is_locked, abs);@*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue