Skip to content
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

[Fixed the Issue] Fixed the Issue#1102 of RL78 of the Context switch … #1157

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion portable/GCC/RL78/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,18 @@ typedef unsigned short UBaseType_t;

/* Task utilities. */
#define portYIELD() __asm volatile ( "BRK" )
#define portYIELD_FROM_ISR( xHigherPriorityTaskWoken ) do { if( xHigherPriorityTaskWoken ) vTaskSwitchContext( ); } while( 0 )
#ifndef configREQUIRE_ASM_ISR_WRAPPER
#define configREQUIRE_ASM_ISR_WRAPPER 1
#endif
#if( configREQUIRE_ASM_ISR_WRAPPER == 1 )
/* You must implement an assembly ISR wrapper (see the below for details) if you need an ISR to cause a context switch.
* https://www.freertos.org/Documentation/02-Kernel/03-Supported-devices/04-Demos/Renesas/RTOS_RL78_IAR_Demos#writing-interrupt-service-routines */
#define portYIELD_FROM_ISR( xHigherPriorityTaskWoken ) do { if( xHigherPriorityTaskWoken != pdFALSE ) vTaskSwitchContext(); } while( 0 )
#else
/* You must not implement an assembly ISR wrapper even if you need an ISR to cause a context switch.
* The portYIELD, which is similar to role of an assembly ISR wrapper, runs only when a context switch is required. */
#define portYIELD_FROM_ISR( xHigherPriorityTaskWoken ) do { if( xHigherPriorityTaskWoken != pdFALSE ) portYIELD(); } while( 0 )
#endif
#define portNOP() __asm volatile ( "NOP" )
/*-----------------------------------------------------------*/

Expand Down
13 changes: 12 additions & 1 deletion portable/IAR/RL78/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,18 @@
/* Task utilities. */
#define portNOP() __asm( "NOP" )
#define portYIELD() __asm( "BRK" )
#define portYIELD_FROM_ISR( xHigherPriorityTaskWoken ) do { if( xHigherPriorityTaskWoken ) vTaskSwitchContext( ); } while( 0 )
#ifndef configREQUIRE_ASM_ISR_WRAPPER
#define configREQUIRE_ASM_ISR_WRAPPER 1
#endif
#if( configREQUIRE_ASM_ISR_WRAPPER == 1 )
/* You must implement an assembly ISR wrapper (see the below for details) if you need an ISR to cause a context switch.
* https://www.freertos.org/Documentation/02-Kernel/03-Supported-devices/04-Demos/Renesas/RTOS_RL78_IAR_Demos#writing-interrupt-service-routines */
#define portYIELD_FROM_ISR( xHigherPriorityTaskWoken ) do { if( xHigherPriorityTaskWoken != pdFALSE ) vTaskSwitchContext(); } while( 0 )
#else
/* You must not implement an assembly ISR wrapper even if you need an ISR to cause a context switch.
* The portYIELD, which is similar to role of an assembly ISR wrapper, runs only when a context switch is required. */
#define portYIELD_FROM_ISR( xHigherPriorityTaskWoken ) do { if( xHigherPriorityTaskWoken != pdFALSE ) portYIELD(); } while( 0 )
#endif
/*-----------------------------------------------------------*/

/* Hardware specifics. */
Expand Down
Loading