Skip to content

Commit

Permalink
Add portMEMORY_BARRIER() to RX MCU ports (#864)
Browse files Browse the repository at this point in the history
* Add portMEMORY_BARRIER() to RX MCU ports

* Remove the memory barrier from the SH2A_FPU portable directory

---------

Co-authored-by: Rahul Kar <[email protected]>
  • Loading branch information
Skptak and kar-rahul-aws authored Nov 29, 2023
1 parent 6a41432 commit 6a9f5a2
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 0 deletions.
2 changes: 2 additions & 0 deletions portable/GCC/RX100/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ void vPortSetIPL( uint32_t ulNewIPL ) __attribute__( ( naked ) );
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void * pvParameters )

#define portMEMORY_BARRIER() __asm volatile ( "" ::: "memory" )

/* *INDENT-OFF* */
#ifdef __cplusplus
}
Expand Down
2 changes: 2 additions & 0 deletions portable/GCC/RX200/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ void vPortSetIPL( uint32_t ulNewIPL ) __attribute__( ( naked ) );
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void * pvParameters )

#define portMEMORY_BARRIER() __asm volatile ( "" ::: "memory" )

/* *INDENT-OFF* */
#ifdef __cplusplus
}
Expand Down
2 changes: 2 additions & 0 deletions portable/GCC/RX600/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ void vPortSetIPL( uint32_t ulNewIPL ) __attribute__( ( naked ) );
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void * pvParameters )

#define portMEMORY_BARRIER() __asm volatile ( "" ::: "memory" )

/* *INDENT-OFF* */
#ifdef __cplusplus
}
Expand Down
2 changes: 2 additions & 0 deletions portable/GCC/RX600v2/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ void vPortSetIPL( uint32_t ulNewIPL ) __attribute__( ( naked ) );
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void * pvParameters )

#define portMEMORY_BARRIER() __asm volatile ( "" ::: "memory" )

/* *INDENT-OFF* */
#ifdef __cplusplus
}
Expand Down
2 changes: 2 additions & 0 deletions portable/GCC/RX700v3_DPFPU/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ void vPortSetIPL( uint32_t ulNewIPL ) __attribute__( ( naked ) );
/* Definition to allow compatibility with existing FreeRTOS Demo using flop.c. */
#define portTASK_USES_FLOATING_POINT() vPortTaskUsesDPFPU()

#define portMEMORY_BARRIER() __asm volatile ( "" ::: "memory" )

/* *INDENT-OFF* */
#ifdef __cplusplus
}
Expand Down
7 changes: 7 additions & 0 deletions portable/Renesas/RX100/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ extern void vTaskExitCritical( void );
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )

#pragma inline_asm vPortMemoryBarrier
static void vPortMemoryBarrier( void )
{
}

#define portMEMORY_BARRIER() vPortMemoryBarrier()

/* *INDENT-OFF* */
#ifdef __cplusplus
}
Expand Down
6 changes: 6 additions & 0 deletions portable/Renesas/RX200/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ extern void vTaskExitCritical( void );
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )

#pragma inline_asm vPortMemoryBarrier
static void vPortMemoryBarrier( void )
{
}

#define portMEMORY_BARRIER() vPortMemoryBarrier()
/* *INDENT-OFF* */
#ifdef __cplusplus
}
Expand Down
7 changes: 7 additions & 0 deletions portable/Renesas/RX600/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ extern void vTaskExitCritical( void );
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )

#pragma inline_asm vPortMemoryBarrier
static void vPortMemoryBarrier( void )
{
}

#define portMEMORY_BARRIER() vPortMemoryBarrier()

/* *INDENT-OFF* */
#ifdef __cplusplus
}
Expand Down
7 changes: 7 additions & 0 deletions portable/Renesas/RX600v2/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ extern void vTaskExitCritical( void );
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )

#pragma inline_asm vPortMemoryBarrier
static void vPortMemoryBarrier( void )
{
}

#define portMEMORY_BARRIER() vPortMemoryBarrier()

/* *INDENT-OFF* */
#ifdef __cplusplus
}
Expand Down
7 changes: 7 additions & 0 deletions portable/Renesas/RX700v3_DPFPU/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@
/* Definition to allow compatibility with existing FreeRTOS Demo using flop.c. */
#define portTASK_USES_FLOATING_POINT() vPortTaskUsesDPFPU()

#pragma inline_asm vPortMemoryBarrier
static void vPortMemoryBarrier( void )
{
}

#define portMEMORY_BARRIER() vPortMemoryBarrier()

/* *INDENT-OFF* */
#ifdef __cplusplus
}
Expand Down

0 comments on commit 6a9f5a2

Please sign in to comment.