|
168 | 168 |
|
169 | 169 | #else /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */
|
170 | 170 |
|
171 |
| - /* Ensure API functions go in the privileged execution section. */ |
| 171 | +/* Ensure API functions go in the privileged execution section. */ |
172 | 172 | #define PRIVILEGED_FUNCTION __attribute__( ( section( "privileged_functions" ) ) )
|
173 | 173 | #define PRIVILEGED_DATA __attribute__( ( section( "privileged_data" ) ) )
|
174 | 174 | #define FREERTOS_SYSTEM_CALL __attribute__( ( section( "freertos_system_calls" ) ) )
|
175 | 175 |
|
176 |
| - /** |
177 |
| - * @brief Calls the port specific code to raise the privilege. |
178 |
| - * |
179 |
| - * Sets xRunningPrivileged to pdFALSE if privilege was raised, else sets |
180 |
| - * it to pdTRUE. |
181 |
| - */ |
182 |
| - #define xPortRaisePrivilege( xRunningPrivileged ) \ |
183 |
| - { \ |
184 |
| - /* Check whether the processor is already privileged. */ \ |
185 |
| - xRunningPrivileged = portIS_PRIVILEGED(); \ |
186 |
| - \ |
187 |
| - /* If the processor is not already privileged, raise privilege. */ \ |
188 |
| - if( xRunningPrivileged == pdFALSE ) \ |
189 |
| - { \ |
190 |
| - portRAISE_PRIVILEGE(); \ |
191 |
| - } \ |
192 |
| - } |
193 |
| - |
194 |
| - /** |
195 |
| - * @brief If xRunningPrivileged is not pdTRUE, calls the port specific |
196 |
| - * code to reset the privilege, otherwise does nothing. |
197 |
| - */ |
198 |
| - #define vPortResetPrivilege( xRunningPrivileged ) \ |
199 |
| - { \ |
200 |
| - if( xRunningPrivileged == pdFALSE ) \ |
201 |
| - { \ |
202 |
| - portRESET_PRIVILEGE(); \ |
203 |
| - } \ |
204 |
| - } |
| 176 | +/** |
| 177 | + * @brief Calls the port specific code to raise the privilege. |
| 178 | + * |
| 179 | + * Sets xRunningPrivileged to pdFALSE if privilege was raised, else sets |
| 180 | + * it to pdTRUE. |
| 181 | + */ |
| 182 | + #define xPortRaisePrivilege( xRunningPrivileged ) \ |
| 183 | + { \ |
| 184 | + /* Check whether the processor is already privileged. */ \ |
| 185 | + xRunningPrivileged = portIS_PRIVILEGED(); \ |
| 186 | + \ |
| 187 | + /* If the processor is not already privileged, raise privilege. */ \ |
| 188 | + if( xRunningPrivileged == pdFALSE ) \ |
| 189 | + { \ |
| 190 | + portRAISE_PRIVILEGE(); \ |
| 191 | + } \ |
| 192 | + } |
| 193 | + |
| 194 | +/** |
| 195 | + * @brief If xRunningPrivileged is not pdTRUE, calls the port specific |
| 196 | + * code to reset the privilege, otherwise does nothing. |
| 197 | + */ |
| 198 | + #define vPortResetPrivilege( xRunningPrivileged ) \ |
| 199 | + { \ |
| 200 | + if( xRunningPrivileged == pdFALSE ) \ |
| 201 | + { \ |
| 202 | + portRESET_PRIVILEGE(); \ |
| 203 | + } \ |
| 204 | + } |
205 | 205 |
|
206 | 206 | #endif /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */
|
207 | 207 |
|
|
0 commit comments