Skip to content

Commit 718178c

Browse files
Alfred Gedeonalfred2g
authored andcommitted
Style: uncrusitfy
1 parent a5dbc2b commit 718178c

File tree

406 files changed

+114804
-112332
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

406 files changed

+114804
-112332
lines changed

croutine.c

Lines changed: 269 additions & 266 deletions
Large diffs are not rendered by default.

event_groups.c

Lines changed: 625 additions & 606 deletions
Large diffs are not rendered by default.

include/FreeRTOS.h

Lines changed: 982 additions & 967 deletions
Large diffs are not rendered by default.

include/StackMacros.h

Lines changed: 58 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#define STACK_MACROS_H
2929

3030
#ifndef _MSC_VER /* Visual Studio doesn't support #warning. */
31-
#warning The name of this file has changed to stack_macros.h. Please update your code accordingly. This source file (which has the original name) will be removed in future released.
31+
#warning The name of this file has changed to stack_macros.h. Please update your code accordingly. This source file (which has the original name) will be removed in future released.
3232
#endif
3333

3434
/*
@@ -47,86 +47,85 @@
4747

4848
/*-----------------------------------------------------------*/
4949

50-
#if( ( configCHECK_FOR_STACK_OVERFLOW == 1 ) && ( portSTACK_GROWTH < 0 ) )
50+
#if ( ( configCHECK_FOR_STACK_OVERFLOW == 1 ) && ( portSTACK_GROWTH < 0 ) )
5151

52-
/* Only the current stack state is to be checked. */
53-
#define taskCHECK_FOR_STACK_OVERFLOW() \
54-
{ \
55-
/* Is the currently saved stack pointer within the stack limit? */ \
56-
if( pxCurrentTCB->pxTopOfStack <= pxCurrentTCB->pxStack ) \
57-
{ \
58-
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
59-
} \
60-
}
52+
/* Only the current stack state is to be checked. */
53+
#define taskCHECK_FOR_STACK_OVERFLOW() \
54+
{ \
55+
/* Is the currently saved stack pointer within the stack limit? */ \
56+
if( pxCurrentTCB->pxTopOfStack <= pxCurrentTCB->pxStack ) \
57+
{ \
58+
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
59+
} \
60+
}
6161

6262
#endif /* configCHECK_FOR_STACK_OVERFLOW == 1 */
6363
/*-----------------------------------------------------------*/
6464

65-
#if( ( configCHECK_FOR_STACK_OVERFLOW == 1 ) && ( portSTACK_GROWTH > 0 ) )
65+
#if ( ( configCHECK_FOR_STACK_OVERFLOW == 1 ) && ( portSTACK_GROWTH > 0 ) )
6666

67-
/* Only the current stack state is to be checked. */
68-
#define taskCHECK_FOR_STACK_OVERFLOW() \
69-
{ \
70-
\
71-
/* Is the currently saved stack pointer within the stack limit? */ \
72-
if( pxCurrentTCB->pxTopOfStack >= pxCurrentTCB->pxEndOfStack ) \
73-
{ \
74-
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
75-
} \
76-
}
67+
/* Only the current stack state is to be checked. */
68+
#define taskCHECK_FOR_STACK_OVERFLOW() \
69+
{ \
70+
\
71+
/* Is the currently saved stack pointer within the stack limit? */ \
72+
if( pxCurrentTCB->pxTopOfStack >= pxCurrentTCB->pxEndOfStack ) \
73+
{ \
74+
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
75+
} \
76+
}
7777

7878
#endif /* configCHECK_FOR_STACK_OVERFLOW == 1 */
7979
/*-----------------------------------------------------------*/
8080

81-
#if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )
82-
83-
#define taskCHECK_FOR_STACK_OVERFLOW() \
84-
{ \
85-
const uint32_t * const pulStack = ( uint32_t * ) pxCurrentTCB->pxStack; \
86-
const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5; \
87-
\
88-
if( ( pulStack[ 0 ] != ulCheckValue ) || \
89-
( pulStack[ 1 ] != ulCheckValue ) || \
90-
( pulStack[ 2 ] != ulCheckValue ) || \
91-
( pulStack[ 3 ] != ulCheckValue ) ) \
92-
{ \
93-
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
94-
} \
95-
}
81+
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )
82+
83+
#define taskCHECK_FOR_STACK_OVERFLOW() \
84+
{ \
85+
const uint32_t * const pulStack = ( uint32_t * ) pxCurrentTCB->pxStack; \
86+
const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5; \
87+
\
88+
if( ( pulStack[ 0 ] != ulCheckValue ) || \
89+
( pulStack[ 1 ] != ulCheckValue ) || \
90+
( pulStack[ 2 ] != ulCheckValue ) || \
91+
( pulStack[ 3 ] != ulCheckValue ) ) \
92+
{ \
93+
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
94+
} \
95+
}
9696

9797
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
9898
/*-----------------------------------------------------------*/
9999

100-
#if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH > 0 ) )
101-
102-
#define taskCHECK_FOR_STACK_OVERFLOW() \
103-
{ \
104-
int8_t *pcEndOfStack = ( int8_t * ) pxCurrentTCB->pxEndOfStack; \
105-
static const uint8_t ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
106-
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
107-
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
108-
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
109-
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE }; \
110-
\
111-
\
112-
pcEndOfStack -= sizeof( ucExpectedStackBytes ); \
113-
\
114-
/* Has the extremity of the task stack ever been written over? */ \
115-
if( memcmp( ( void * ) pcEndOfStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 ) \
116-
{ \
117-
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
118-
} \
119-
}
100+
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH > 0 ) )
101+
102+
#define taskCHECK_FOR_STACK_OVERFLOW() \
103+
{ \
104+
int8_t * pcEndOfStack = ( int8_t * ) pxCurrentTCB->pxEndOfStack; \
105+
static const uint8_t ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
106+
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
107+
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
108+
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
109+
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE }; \
110+
\
111+
\
112+
pcEndOfStack -= sizeof( ucExpectedStackBytes ); \
113+
\
114+
/* Has the extremity of the task stack ever been written over? */ \
115+
if( memcmp( ( void * ) pcEndOfStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 ) \
116+
{ \
117+
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
118+
} \
119+
}
120120

121121
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
122122
/*-----------------------------------------------------------*/
123123

124124
/* Remove stack overflow macro if not being used. */
125125
#ifndef taskCHECK_FOR_STACK_OVERFLOW
126-
#define taskCHECK_FOR_STACK_OVERFLOW()
126+
#define taskCHECK_FOR_STACK_OVERFLOW()
127127
#endif
128128

129129

130130

131131
#endif /* STACK_MACROS_H */
132-

0 commit comments

Comments
 (0)