Make the presubmit checker happy

This commit is contained in:
Jacob Potter 2021-01-01 14:46:18 -07:00
parent 6ed9c1fa29
commit b439f9b90f
4 changed files with 16 additions and 14 deletions

View file

@ -22,6 +22,7 @@
* https://www.FreeRTOS.org * https://www.FreeRTOS.org
* https://github.com/FreeRTOS * https://github.com/FreeRTOS
* *
* 1 tab == 4 spaces!
*/ */
@ -95,7 +96,7 @@ save and restore clobbered registers manually. */
"POP R10 \n" \ "POP R10 \n" \
) )
#define portYIELD_FROM_ISR( x ) do { if( x != pdFALSE ) portYIELD(); } while( 0 ) #define portYIELD_FROM_ISR( x ) if( x != pdFALSE ) portYIELD()
/* These macros should not be called directly, but through the /* These macros should not be called directly, but through the
taskENTER_CRITICAL() and taskEXIT_CRITICAL() macros. An extra check is taskENTER_CRITICAL() and taskEXIT_CRITICAL() macros. An extra check is

View file

@ -18,6 +18,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
* 1 tab == 4 spaces!
*/ */
#ifndef PORTMACRO_H #ifndef PORTMACRO_H
@ -122,17 +123,15 @@ extern __attribute__((naked)) void cpu_yeild(void);
extern portLONG ulCriticalNesting; extern portLONG ulCriticalNesting;
extern portLONG pendsvflag; extern portLONG pendsvflag;
#define portYIELD() do { \ #define portYIELD() if (ulCriticalNesting == 0) \
if (ulCriticalNesting == 0) \ { \
{ \ vPortYield(); \
vPortYield(); \ } \
} \ else \
else \ { \
{ \ pendsvflag = 1; \
pendsvflag = 1; \ } \
} \ portNOP();portNOP()
portNOP(); portNOP(); \
} while( 0 )
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/

View file

@ -22,6 +22,7 @@
* https://www.FreeRTOS.org * https://www.FreeRTOS.org
* https://github.com/FreeRTOS * https://github.com/FreeRTOS
* *
* 1 tab == 4 spaces!
*/ */
@ -78,7 +79,7 @@ extern void vPortYield( void );
#define portYIELD() vPortYield() #define portYIELD() vPortYield()
#define portEND_SWITCHING_ISR( xSwitchRequired ) do { if( xSwitchRequired != pdFALSE ) vPortYield(); } while( 0 ) #define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) vPortYield()
#define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/

View file

@ -24,6 +24,7 @@
* https://www.FreeRTOS.org * https://www.FreeRTOS.org
* https://github.com/FreeRTOS * https://github.com/FreeRTOS
* *
* 1 tab == 4 spaces!
*/ */
/* /*
@ -193,7 +194,7 @@ typedef struct {
#if configASSERT_2 #if configASSERT_2
#include <stdio.h> #include <stdio.h>
void exit(int); void exit(int);
#define configASSERT( x ) do { if (!(x)) { porttracePrint(-1); printf("\nAssertion failed in %s:%d\n", __FILE__, __LINE__); exit(-1); } } while( 0 ) #define configASSERT( x ) if (!(x)) { porttracePrint(-1); printf("\nAssertion failed in %s:%d\n", __FILE__, __LINE__); exit(-1); }
#endif #endif