Code cleanup (#288)

* Update port.c

* Code cleanup

Misc coding style cleanup and typo fixes

* Fix ASM style

Fix ASM style

* Fix header check

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

Co-authored-by: Carl Lundin <53273776+lundinc2@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
This commit is contained in:
carlo-dev-git 2021-04-07 23:19:31 +02:00 committed by GitHub
parent b08c19f745
commit 75e0c36eb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 38 deletions

View file

@ -243,14 +243,14 @@ __asm void vPortSVCHandler( void )
PRESERVE8
/* Get the location of the current TCB. */
ldr r3, = pxCurrentTCB
ldr r3, =pxCurrentTCB
ldr r1, [ r3 ]
ldr r0, [ r1 ]
/* Pop the core registers. */
ldmia r0 !, {r4-r11,r14}
ldmia r0!, {r4-r11,r14}
msr psp, r0
isb
mov r0, # 0
mov r0, #0
msr basepri, r0
bx r14
/* *INDENT-ON* */
@ -477,12 +477,12 @@ __asm void xPortPendSVHandler( void )
str r0, [ r2 ]
stmdb sp!, {r0, r3}
mov r0, # configMAX_SYSCALL_INTERRUPT_PRIORITY
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
msr basepri, r0
dsb
isb
bl vTaskSwitchContext
mov r0, # 0
mov r0, #0
msr basepri, r0
ldmia sp!, {r0, r3}
@ -495,7 +495,7 @@ __asm void xPortPendSVHandler( void )
/* Is the task using the FPU context? If so, pop the high vfp registers
* too. */
tst r14, # 0x10
tst r14, #0x10
it eq
vldmiaeq r0!, {s16-s31}
@ -775,10 +775,10 @@ __asm uint32_t vPortGetIPSR( void )
* be set to a value equal to or numerically *higher* than
* configMAX_SYSCALL_INTERRUPT_PRIORITY.
*
* Interrupts that use the FreeRTOS API must not be left at their
* default priority of zero as that is the highest possible priority,
* Interrupts that use the FreeRTOS API must not be left at their
* default priority of zero as that is the highest possible priority,
* which is guaranteed to be above configMAX_SYSCALL_INTERRUPT_PRIORITY,
* and therefore also guaranteed to be invalid.
* and therefore also guaranteed to be invalid.
*
* FreeRTOS maintains separate thread and ISR API functions to ensure
* interrupt entry is as fast and simple as possible.

View file

@ -22,14 +22,13 @@
* https://www.FreeRTOS.org
* https://github.com/FreeRTOS
*
* 1 tab == 4 spaces!
*/
#ifndef PORTMACRO_H
#define PORTMACRO_H
/* *INDENT-OFF* */
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
@ -173,7 +172,7 @@
/* Barrier instructions are not used as this function is only used to
* lower the BASEPRI value. */
/* *INDENT-OFF* */
msr basepri, ulBASEPRI
msr basepri, ulBASEPRI
/* *INDENT-ON* */
}
}