Skip to content

Commit 02718f1

Browse files
committed
newlib-freertos.h: Adjust include guards and formatting.
1 parent 8eeece8 commit 02718f1

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

include/newlib-freertos.h

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,33 @@
4545

4646
#ifndef configTLS_BLOCK_TYPE
4747
#define configTLS_BLOCK_TYPE struct _reent
48-
#endif
48+
#endif /* configTLS_BLOCK_TYPE */
4949

5050
#ifndef configINIT_TLS_BLOCK
51-
#define configINIT_TLS_BLOCK( xTLSBlock, pxTopOfStack ) _REENT_INIT_PTR( &( xTLSBlock ) )
52-
#endif
51+
#define configINIT_TLS_BLOCK( xTLSBlock, pxTopOfStack ) \
52+
do \
53+
{ \
54+
_REENT_INIT_PTR( &( xTLSBlock ) ); \
55+
} \
56+
while( 0 )
57+
#endif /* configINIT_TLS_BLOCK */
5358

5459
#ifndef configSET_TLS_BLOCK
55-
#define configSET_TLS_BLOCK( xTLSBlock ) _impure_ptr = &( xTLSBlock )
56-
#endif
60+
#define configSET_TLS_BLOCK( xTLSBlock ) \
61+
do \
62+
{ \
63+
_impure_ptr = &( xTLSBlock ); \
64+
} \
65+
while( 0 )
66+
#endif /* configSET_TLS_BLOCK */
5767

5868
#ifndef configDEINIT_TLS_BLOCK
59-
#define configDEINIT_TLS_BLOCK( xTLSBlock ) _reclaim_reent( &( xTLSBlock ) )
60-
#endif
69+
#define configDEINIT_TLS_BLOCK( xTLSBlock ) \
70+
do \
71+
{ \
72+
_reclaim_reent( &( xTLSBlock ) ); \
73+
} \
74+
while( 0 )
75+
#endif /* configDEINIT_TLS_BLOCK */
6176

6277
#endif /* INC_NEWLIB_FREERTOS_H */

0 commit comments

Comments
 (0)