Add trace hook macro for most ports (#794)

Add trace hook macro for most ports

In pull request #659 we introduced better support for tracing
tools like systemview. This patchset adds support for more
ports as requested in the original pull request.
This commit is contained in:
Boris van der Meer 2023-09-20 12:49:42 +02:00 committed by GitHub
parent 83861f5b1d
commit d43062ba78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
103 changed files with 1005 additions and 134 deletions

View file

@ -84,9 +84,20 @@ typedef unsigned long UBaseType_t;
/*-----------------------------------------------------------*/
extern void vTaskSwitchContext( void );
#define portYIELD() asm volatile ( "trap" );
#define portEND_SWITCHING_ISR( xSwitchRequired ) do { if( xSwitchRequired ) vTaskSwitchContext( ); } while( 0 )
#define portYIELD() asm volatile ( "trap" );
#define portEND_SWITCHING_ISR( xSwitchRequired ) \
do \
{ \
if( xSwitchRequired != pdFALSE ) \
{ \
traceISR_EXIT_TO_SCHEDULER(); \
vTaskSwitchContext(); \
} \
else \
{ \
traceISR_EXIT(); \
} \
} while( 0 )
/* Include the port_asm.S file where the Context saving/restoring is defined. */
__asm__ ( "\n\t.globl save_context" );