/* most messages do not have a buffer so there really isn't anything to free */ void SendToFreeQueue(tMessage* pMsg) { if (pMsg->pBuffer != NULL) { /* The free queue holds pointers to buffers, not messages */ BPL_FreeMessageBuffer(pMsg->pBuffer); } }
/* most messages do not have a buffer so there really isn't anything to free */ void SendToFreeQueue(tMessage* pMsg) { if ( pMsg->pBuffer != 0 ) { /* The free queue is different. * It holds pointers to buffers not messages */ BPL_FreeMessageBuffer(pMsg->pBuffer); } }
/*! Function to implement the BackgroundTask loop * * \param pvParameters not used * */ static void BackgroundTask(void *pvParameters) { if ( QueueHandles[BACKGROUND_QINDEX] == 0 ) { PrintString("Background Queue not created!\r\n"); } for(;;) { if( pdTRUE == xQueueReceive(QueueHandles[BACKGROUND_QINDEX], &pBackgroundMsg, portMAX_DELAY ) ) { BackgroundMessageHandler(pBackgroundMsg); BPL_FreeMessageBuffer(&pBackgroundMsg); } } }