Skip to content

Commit 0b20405

Browse files
author
Keith Packard
committed
portable-ARC: Adapt ARC support to use generalized TLS support
With generalized thread local storage (TLS) support present in the core, the two ARC ports need to have the changes to the TCB mirrored to them. Signed-off-by: Keith Packard <[email protected]>
1 parent 4dc3f0f commit 0b20405

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

portable/ThirdParty/GCC/ARC_EM_HS/port.c

+2-10
Original file line numberDiff line numberDiff line change
@@ -251,16 +251,8 @@ void vPortEndTask( void )
251251
uint32_t ulRunTimeCounter; /*< Stores the amount of time the task has spent in the Running state. */
252252
#endif
253253

254-
#if ( configUSE_NEWLIB_REENTRANT == 1 )
255-
256-
/* Allocate a Newlib reent structure that is specific to this task.
257-
* Note Newlib support has been included by popular demand, but is not
258-
* used by the FreeRTOS maintainers themselves. FreeRTOS is not
259-
* responsible for resulting newlib operation. User must be familiar with
260-
* newlib and must provide system-wide implementations of the necessary
261-
* stubs. Be warned that (at the time of writing) the current newlib design
262-
* implements a system-wide malloc() that must be provided with locks. */
263-
struct _reent xNewLib_reent;
254+
#if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 )
255+
configTLS_BLOCK_TYPE xTLSBlock; /*< Memory block used as Thread Local Storage (TLS) Block for the task. */
264256
#endif
265257

266258
#if ( configUSE_TASK_NOTIFICATIONS == 1 )

portable/ThirdParty/GCC/ARC_v1/port.c

+2-10
Original file line numberDiff line numberDiff line change
@@ -251,16 +251,8 @@ void vPortEndTask( void )
251251
uint32_t ulRunTimeCounter; /*< Stores the amount of time the task has spent in the Running state. */
252252
#endif
253253

254-
#if ( configUSE_NEWLIB_REENTRANT == 1 )
255-
256-
/* Allocate a Newlib reent structure that is specific to this task.
257-
* Note Newlib support has been included by popular demand, but is not
258-
* used by the FreeRTOS maintainers themselves. FreeRTOS is not
259-
* responsible for resulting newlib operation. User must be familiar with
260-
* newlib and must provide system-wide implementations of the necessary
261-
* stubs. Be warned that (at the time of writing) the current newlib design
262-
* implements a system-wide malloc() that must be provided with locks. */
263-
struct _reent xNewLib_reent;
254+
#if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 )
255+
configTLS_BLOCK_TYPE xTLSBlock; /*< Memory block used as Thread Local Storage (TLS) Block for the task. */
264256
#endif
265257

266258
#if ( configUSE_TASK_NOTIFICATIONS == 1 )

0 commit comments

Comments
 (0)