/** * @brief stops the event processor * * Stops the event processor and frees the event queue semaphore * Called by the component de-initialization function, ixEthDBUnload() * * @warning do not call directly * * @return IX_ETH_DB_SUCCESS if the operation completed * successfully or IX_ETH_DB_FAIL otherwise; * * @internal */ IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBStopLearningFunction(void) { ixEthDBLearningShutdown = true; /* wake up event processing loop to actually process the shutdown event */ ixOsalSemaphorePost(&eventQueueSemaphore); if (ixOsalSemaphoreDestroy(&eventQueueSemaphore) != IX_SUCCESS) { return IX_ETH_DB_FAIL; } return IX_ETH_DB_SUCCESS; }
/** * @ingroup IxTimeSyncAccCodelet * * @fn ixTimeSyncAccCodeletPTPMsgTransmitStop () * * @brief Stop PTP message transmission and destroy semaphore that is used in the * transmission. * * @return void */ PRIVATE void ixTimeSyncAccCodeletPTPMsgTransmitStop () { /* set PTP message transmission halt flag */ ixTimeSyncAccCodeletTxHalt = TRUE; /* wait for a while to let unfinished PTP message transmission to complete */ ixOsalSleep (IX_TIMESYNCACC_CODELET_PTP_MSG_XMIT_INTERVAL); if (NULL != ixTimeSyncAccCodeletSemId) { if (IX_SUCCESS != ixOsalSemaphoreDestroy (&ixTimeSyncAccCodeletSemId)) { ixOsalLog (IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDERR, "ixTimeSyncAccCodeletPTPMsgTransmitStop: failed to destroy semaphore\n", 0, 0, 0, 0, 0, 0); } ixTimeSyncAccCodeletSemId = NULL; } } /* end of ixTimeSyncAccCodeletPTPMsgTransmitStop function */
/** * @brief stops the event processor * * Stops the event processor and frees the event queue semaphore * Called by the component de-initialization function, ixEthDBUnload() * * @warning do not call directly * * @return IX_ETH_DB_SUCCESS if the operation completed * successfully or IX_ETH_DB_FAIL otherwise; * * @internal */ IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBStopLearningFunction(void) { if (IX_FEATURE_CTRL_SWCONFIG_ENABLED == ixFeatureCtrlSwConfigurationCheck (IX_FEATURECTRL_ETH_LEARNING)) { ixEthDBLearningShutdown = TRUE; /* wake up event processing loop to actually process the shutdown event */ ixOsalSemaphorePost(&eventQueueSemaphore); if (ixOsalSemaphoreDestroy(&eventQueueSemaphore) != IX_SUCCESS) { return IX_ETH_DB_FAIL; } return IX_ETH_DB_SUCCESS; } return IX_ETH_DB_FEATURE_UNAVAILABLE; }
PUBLIC IX_STATUS ixOsalMutexDestroy (IxOsalMutex * mutex) { return ixOsalSemaphoreDestroy((IxOsalSemaphore *) mutex); }