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
|
@ -74,7 +74,7 @@ void vEMACISR_Handler( void );
|
|||
void vEMACISR_Handler( void )
|
||||
{
|
||||
volatile unsigned portLONG ulIntStatus, ulEventStatus;
|
||||
portBASE_TYPE xSwitchRequired = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
extern void vClearEMACTxBuffer( void );
|
||||
|
||||
/* Find the cause of the interrupt. */
|
||||
|
@ -85,7 +85,7 @@ extern void vClearEMACTxBuffer( void );
|
|||
{
|
||||
/* A frame has been received, signal the lwIP task so it can process
|
||||
the Rx descriptors. */
|
||||
xSwitchRequired = xSemaphoreGiveFromISR( xSemaphore, pdFALSE );
|
||||
xSemaphoreGiveFromISR( xSemaphore, &xHigherPriorityTaskWoken );
|
||||
AT91C_BASE_EMAC->EMAC_RSR = AT91C_EMAC_REC;
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ extern void vClearEMACTxBuffer( void );
|
|||
switch to another task. If the unblocked task was of higher priority then
|
||||
the interrupted task it will then execute immediately that the ISR
|
||||
completes. */
|
||||
if( xSwitchRequired )
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
portYIELD_FROM_ISR();
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ void vUSB_ISR_Handler( void );
|
|||
|
||||
void vUSB_ISR_Handler( void )
|
||||
{
|
||||
portCHAR cTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
static volatile unsigned portLONG ulNextMessage = 0;
|
||||
xISRStatus *pxMessage;
|
||||
unsigned portLONG ulRxBytes;
|
||||
|
@ -145,13 +145,13 @@ unsigned portCHAR ucFifoIndex;
|
|||
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_3 ] &= ~usbINT_CLEAR_MASK;
|
||||
|
||||
/* Post ISR data to queue for task-level processing */
|
||||
cTaskWokenByPost = xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, cTaskWokenByPost );
|
||||
xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, &xHigherPriorityTaskWoken );
|
||||
|
||||
/* Clear AIC to complete ISR processing */
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
|
||||
/* Do a task switch if needed */
|
||||
if( cTaskWokenByPost )
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
/* This call will ensure that the unblocked task will be executed
|
||||
immediately upon completion of the ISR if it has a priority higher
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue