Update SMP branch readme for port migration (#999)

smp
chinglee-iot 12 months ago committed by GitHub
parent eb80149cd7
commit 81c623212a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -9,6 +9,44 @@ The contents of this branch will remain available for certain period but we will
Have more questions? Post them in the [FreeRTOS forum](https://forums.freertos.org/).
## Migrate port from SMP branch to FreeRTOS v11
The following changes should be applied to migrate a port from this branch to FreeRTOS v11:
* Call `xTaskIncrementTick` in critical section in port
RP2040 example:
```c
void xPortSysTickHandler( void )
{
portBASE_TYPE xPreviousMask;
/* xTaskIncrementTick now must be called in critical section. */
xPreviousMask = taskENTER_CRITICAL_FROM_ISR();
{
/* Increment the RTOS tick. */
if( xTaskIncrementTick() != pdFALSE )
{
/* Pend a context switch. */
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
}
}
taskEXIT_CRITICAL_FROM_ISR( xPreviousMask );
}
```
* Rename `configNUM_CORES` to `configNUMBER_OF_CORES`
* Define `portSET/CLEAR_INTERRUPT_MASK` in port
* Define `portENTER/EXIT_CRITICAL_FROM_ISR` for SMP in port
* These macros should be implemented with `vTaskEnterCriticalFromISR`/`xTaskExitCriticalFromISR`
* Update `portSET/CLEAR_INTERRUPT_MASK_FROM_ISR` implementation in port
* SMP-dev doesnt use these macros to enter/exit critical section from ISR. Instead,
`portENTER/EXIT_CRITICAL_FROM_ISR` are used. These functions should be implemented as
the macro name suggested, set or clear interrupt mask from ISR if nested interrupt are supported.
---

Loading…
Cancel
Save