mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics.
This commit is contained in:
parent
7eb7201b46
commit
f4dd20dffc
54 changed files with 266 additions and 251 deletions
|
@ -900,7 +900,7 @@ static long prvMACB_ISR_NonNakedBehaviour( void )
|
|||
|
||||
// Variable definitions can be made now.
|
||||
volatile unsigned long ulIntStatus, ulEventStatus;
|
||||
long xSwitchRequired = FALSE;
|
||||
long xHigherPriorityTaskWoken = FALSE;
|
||||
|
||||
// Find the cause of the interrupt.
|
||||
ulIntStatus = AVR32_MACB.isr;
|
||||
|
@ -912,7 +912,7 @@ static long prvMACB_ISR_NonNakedBehaviour( void )
|
|||
// the Rx descriptors.
|
||||
portENTER_CRITICAL();
|
||||
#ifdef FREERTOS_USED
|
||||
xSwitchRequired = xSemaphoreGiveFromISR( xSemaphore, FALSE );
|
||||
xSemaphoreGiveFromISR( xSemaphore, &xHigherPriorityTaskWoken );
|
||||
#else
|
||||
DataToRead = TRUE;
|
||||
#endif
|
||||
|
@ -930,7 +930,7 @@ static long prvMACB_ISR_NonNakedBehaviour( void )
|
|||
AVR32_MACB.tsr;
|
||||
}
|
||||
|
||||
return ( xSwitchRequired );
|
||||
return ( xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ static portBASE_TYPE prvUSART0_ISR_NonNakedBehaviour( void )
|
|||
{
|
||||
/* Now we can declare the local variables. */
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
unsigned portLONG ulStatus;
|
||||
volatile avr32_usart_t *usart0 = &AVR32_USART0;
|
||||
portBASE_TYPE retstatus;
|
||||
|
@ -103,7 +103,7 @@ static portBASE_TYPE prvUSART0_ISR_NonNakedBehaviour( void )
|
|||
/* Because FreeRTOS is not supposed to run with nested interrupts, put all OS
|
||||
calls in a critical section . */
|
||||
portENTER_CRITICAL();
|
||||
retstatus = xQueueReceiveFromISR(xCharsForTx, &cChar, &xTaskWokenByTx);
|
||||
retstatus = xQueueReceiveFromISR(xCharsForTx, &cChar, &xHigherPriorityTaskWoken);
|
||||
portEXIT_CRITICAL();
|
||||
if (retstatus == pdTRUE)
|
||||
{
|
||||
|
@ -126,17 +126,13 @@ static portBASE_TYPE prvUSART0_ISR_NonNakedBehaviour( void )
|
|||
/* Because FreeRTOS is not supposed to run with nested interrupts, put all OS
|
||||
calls in a critical section . */
|
||||
portENTER_CRITICAL();
|
||||
retstatus = xQueueSendFromISR(xRxedChars, &cChar, pdFALSE);
|
||||
xQueueSendFromISR(xRxedChars, &cChar, &xHigherPriorityTaskWoken);
|
||||
portEXIT_CRITICAL();
|
||||
if (retstatus)
|
||||
{
|
||||
xTaskWokenByRx = pdTRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* The return value will be used by portEXIT_SWITCHING_ISR() to know if it
|
||||
should perform a vTaskSwitchContext(). */
|
||||
return ( xTaskWokenByTx || xTaskWokenByRx );
|
||||
return ( xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue