#define portSET_INTERRUPT_MASK_FROM_ISR() 0;vPortSetInterruptMask()
这条宏定义怎么理解?难道是portSET_INTERRUPT_MASK_FROM_ISR()=0吗? 那分号后面的vPortSetInterruptMask()又是什么意思呢? 搜了一下vPortSetInterruptMask()函数还有实体。
但是在宏调用的时候函数如下
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 为什么直接在这个语句下面用大括号呢?
{
if( xTaskIsTaskSuspended( pxTCB ) == pdTRUE )
{
traceTASK_RESUME_FROM_ISR( pxTCB );
if( uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdFALSE )
{
xYieldRequired = ( pxTCB->uxPriority >= pxCurrentTCB->uxPriority );
vListRemove( &( pxTCB->xGenericListItem ) );
prvAddTaskToReadyQueue( pxTCB );
}
else
{
/* We cannot access the delayed or ready lists, so will hold this
task pending until the scheduler is resumed, at which point a
yield will be performed if necessary. */
vListInsertEnd( ( xList * ) &( xPendingReadyList ), &( pxTCB->xEventListItem ) );
}
}
}
请大师帮忙解释一下 |