forked from FreeRTOS/FreeRTOS
-
Notifications
You must be signed in to change notification settings - Fork 1
Granular Locks Test Setup #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rohitmadan07
wants to merge
8
commits into
dev/granular_lock_unit_test
Choose a base branch
from
granular_lock_test_setup
base: dev/granular_lock_unit_test
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
51b2c54
Adding granular lock nullfication utest
chinglee-iot 1335ac7
Update test case for critical nesting problem in xQueueReceive
chinglee-iot 4f9ea3b
Update granular lock functional tests for interrupt status
chinglee-iot 311ed05
Add more test cases to cover the following combination
chinglee-iot b92b350
Add declaration of port data group critical section
10773fd
Modify smp Makefile
8bc9937
Fix failing smp tests
73b17cc
Separate tests based on timers
rohitmadan07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Submodule Source
updated
15 files
+0 −3 | .github/.cSpellWords.txt | |
+0 −135 | History.txt | |
+2 −2 | MISRA.md | |
+262 −17 | event_groups.c | |
+0 −4 | examples/coverity/coverity_misra.config | |
+411 −0 | granular_locks_v4.md | |
+88 −12 | include/FreeRTOS.h | |
+12 −0 | include/task.h | |
+12 −12 | portable/GCC/RISC-V/chip_specific_extensions/Pulpino_Vega_RV32M1RM/freertos_risc_v_chip_specific_extensions.h | |
+42 −54 | portable/GCC/RISC-V/portASM.S | |
+69 −218 | portable/GCC/RISC-V/portContext.h | |
+487 −175 | queue.c | |
+242 −19 | stream_buffer.c | |
+866 −524 | tasks.c | |
+200 −112 | timers.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
175 changes: 175 additions & 0 deletions
175
FreeRTOS/Test/CMock/smp/granular_lock/FreeRTOSConfig_1.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
/* | ||
* FreeRTOS V202212.00 | ||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
* this software and associated documentation files (the "Software"), to deal in | ||
* the Software without restriction, including without limitation the rights to | ||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
* the Software, and to permit persons to whom the Software is furnished to do so, | ||
* subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* https://www.FreeRTOS.org | ||
* https://github.com/FreeRTOS | ||
* | ||
*/ | ||
|
||
|
||
#ifndef FREERTOS_CONFIG_H | ||
#define FREERTOS_CONFIG_H | ||
|
||
#include "fake_assert.h" | ||
|
||
/*----------------------------------------------------------- | ||
* Application specific definitions. | ||
* | ||
* These definitions should be adjusted for your particular hardware and | ||
* application requirements. | ||
* | ||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE | ||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. See | ||
* https://www.FreeRTOS.org/a00110.html | ||
*----------------------------------------------------------*/ | ||
|
||
/* SMP test specific configuration */ | ||
#define configRUN_MULTIPLE_PRIORITIES 1 | ||
#define configNUMBER_OF_CORES 16 | ||
#define configUSE_CORE_AFFINITY 0 | ||
#define configUSE_TIME_SLICING 0 | ||
#define configUSE_TASK_PREEMPTION_DISABLE 1 | ||
#define configTICK_CORE 0 | ||
|
||
/* OS Configuration */ | ||
#define configUSE_PREEMPTION 1 | ||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 | ||
#define configUSE_IDLE_HOOK 0 | ||
#define configUSE_TICK_HOOK 0 | ||
#define configUSE_DAEMON_TASK_STARTUP_HOOK 0 | ||
#define configTICK_RATE_HZ ( 1000 ) | ||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) | ||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 52 * 1024 ) ) | ||
#define configMAX_TASK_NAME_LEN ( 12 ) | ||
#define configUSE_TRACE_FACILITY 1 | ||
#define configUSE_16_BIT_TICKS 0 | ||
#define configIDLE_SHOULD_YIELD 1 | ||
#define configUSE_MUTEXES 1 | ||
#define configCHECK_FOR_STACK_OVERFLOW 0 | ||
#define configUSE_RECURSIVE_MUTEXES 1 | ||
#define configQUEUE_REGISTRY_SIZE 20 | ||
#define configUSE_MALLOC_FAILED_HOOK 1 | ||
#define configUSE_APPLICATION_TASK_TAG 1 | ||
#define configUSE_COUNTING_SEMAPHORES 1 | ||
#define configUSE_ALTERNATIVE_API 0 | ||
#define configUSE_QUEUE_SETS 1 | ||
#define configUSE_TASK_NOTIFICATIONS 1 | ||
#define configTASK_NOTIFICATION_ARRAY_ENTRIES 5 | ||
#define configSUPPORT_STATIC_ALLOCATION 0 | ||
#define configINITIAL_TICK_COUNT ( ( TickType_t ) 0 ) | ||
#define configSTREAM_BUFFER_TRIGGER_LEVEL_TEST_MARGIN 1 | ||
#define portREMOVE_STATIC_QUALIFIER 1 | ||
#define portCRITICAL_NESTING_IN_TCB 0 | ||
#define portSTACK_GROWTH ( 1 ) | ||
#define configUSE_PASSIVE_IDLE_HOOK 0 | ||
#define configUSE_TICKLESS_IDLE 1 | ||
#define configSTACK_DEPTH_TYPE uint32_t | ||
|
||
/* Software timer related configuration options. */ | ||
#define configUSE_TIMERS 0 | ||
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 ) | ||
#define configTIMER_QUEUE_LENGTH 20 | ||
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 ) | ||
|
||
#define configMAX_PRIORITIES ( 7 ) | ||
|
||
/* Run time stats gathering configuration options. */ | ||
unsigned long ulGetRunTimeCounterValue( void ); /* Prototype of function that returns run time counter. */ | ||
void vConfigureTimerForRunTimeStats( void ); /* Prototype of function that initialises the run time counter. */ | ||
#define configGENERATE_RUN_TIME_STATS 0 | ||
#define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeCounterValue() | ||
#define portUSING_MPU_WRAPPERS 0 | ||
#define portHAS_STACK_OVERFLOW_CHECKING 0 | ||
#define configENABLE_MPU 0 | ||
|
||
/* Co-routine related configuration options. */ | ||
#define configUSE_CO_ROUTINES 0 | ||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) | ||
|
||
/* This demo makes use of one or more example stats formatting functions. These | ||
* format the raw data provided by the uxTaskGetSystemState() function in to human | ||
* readable ASCII form. See the notes in the implementation of vTaskList() within | ||
* FreeRTOS/Source/tasks.c for limitations. */ | ||
#define configUSE_STATS_FORMATTING_FUNCTIONS 1 | ||
|
||
/* Set the following definitions to 1 to include the API function, or zero | ||
* to exclude the API function. In most cases the linker will remove unused | ||
* functions anyway. */ | ||
#define INCLUDE_vTaskPrioritySet 1 | ||
#define INCLUDE_uxTaskPriorityGet 1 | ||
#define INCLUDE_vTaskDelete 1 | ||
#define INCLUDE_vTaskCleanUpResources 0 | ||
#define INCLUDE_vTaskSuspend 1 | ||
#define INCLUDE_vTaskDelayUntil 1 | ||
#define INCLUDE_vTaskDelay 1 | ||
#define INCLUDE_uxTaskGetStackHighWaterMark 1 | ||
#define INCLUDE_xTaskGetSchedulerState 1 | ||
#define INCLUDE_xTimerGetTimerDaemonTaskHandle 1 | ||
#define INCLUDE_xTaskGetIdleTaskHandle 1 | ||
#define INCLUDE_xTaskGetCurrentTaskHandle 1 | ||
#define INCLUDE_xTaskGetHandle 1 | ||
#define INCLUDE_eTaskGetState 1 | ||
#define INCLUDE_xSemaphoreGetMutexHolder 1 | ||
#define INCLUDE_xTimerPendFunctionCall 0 | ||
#define INCLUDE_xTaskAbortDelay 1 | ||
#define INCLUDE_xTaskGetCurrentTaskHandle 1 | ||
|
||
/* It is a good idea to define configASSERT() while developing. configASSERT() | ||
* uses the same semantics as the standard C assert() macro. */ | ||
#define configASSERT( x ) \ | ||
do \ | ||
{ \ | ||
if( x ) \ | ||
{ \ | ||
vFakeAssert( true, __FILE__, __LINE__ ); \ | ||
} \ | ||
else \ | ||
{ \ | ||
vFakeAssert( false, __FILE__, __LINE__ ); \ | ||
} \ | ||
} while( 0 ) | ||
|
||
#define configINCLUDE_MESSAGE_BUFFER_AMP_DEMO 0 | ||
#if ( configINCLUDE_MESSAGE_BUFFER_AMP_DEMO == 1 ) | ||
extern void vGenerateCoreBInterrupt( void * xUpdatedMessageBuffer ); | ||
#define sbSEND_COMPLETED( pxStreamBuffer ) vGenerateCoreBInterrupt( pxStreamBuffer ) | ||
#endif /* configINCLUDE_MESSAGE_BUFFER_AMP_DEMO */ | ||
|
||
/* =========================== INSTRUMENT THROUGH TRACE MACRO =========================== */ | ||
int xTraceBlockingOnQueueReceive( void * pxQueue ); | ||
#define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ) do{ if( xTraceBlockingOnQueueReceive( pxQueue ) != 0 ) { return errQUEUE_EMPTY; } } while( 0 ) | ||
|
||
int xTraceUnblockingOnQueueReceive( void * pxQueue ); | ||
#define traceUNBLOCKING_ON_QUEUE_RECEIVE( pxQueue ) do{ if( xTraceUnblockingOnQueueReceive( pxQueue ) != 0 ) { return errQUEUE_EMPTY; } } while( 0 ) | ||
|
||
int xTraceBlockingOnQueueSend( void * pxQueue ); | ||
#define traceBLOCKING_ON_QUEUE_SEND( pxQueue ) do{ if( xTraceBlockingOnQueueSend( pxQueue ) != 0 ) { return errQUEUE_FULL; } } while( 0 ) | ||
|
||
int xTraceUnblockingOnQueueSend( void * pxQueue ); | ||
#define traceUNBLOCKING_ON_QUEUE_SEND( pxQueue ) do{ if( xTraceUnblockingOnQueueSend( pxQueue ) != 0 ) { return errQUEUE_FULL; } } while( 0 ) | ||
|
||
int xTraceEventGroupTaskBlocked( void * pxEventGroup ); | ||
#define traceEVENT_GROUP_BLOCK_ON_BITS_WAITING( pxEventGroup, uxBitsToWaitFor ) do{ if( xTraceEventGroupTaskBlocked( pxEventGroup ) != 0 ) { return 0; } } while( 0 ) | ||
|
||
int xTraceEventGroupTaskUnblocked( void * pxEventGroup ); | ||
#define traceEVENT_GROUP_UNBLOCK_ON_BITS_WAITING( pxEventGroup, uxBitsToWaitFor, xMatchFound ) do{ if( xTraceEventGroupTaskUnblocked( pxEventGroup ) != 0 ) { return 0; } } while( 0 ) | ||
|
||
#endif /* FREERTOS_CONFIG_H */ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bringing smp before timers is required because the timer tests add a
stopTimers
function at the end of timers.c file. This causes compilation issues for the smp tests for which timers.c is a test source file