/* initializes the event queue and the event processor 
This function is called by the component initialization function, ixEthDBInit(). */
IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBStartLearningFunction(void)
/* initializes the event queue and the event processor 
This function is called by the component initialization function, ixEthDBInit(). */
IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBStartLearningFunction(void)
{
    IxOsalThread eventProcessorThread;
    IxOsalThreadAttr threadAttr;
    threadAttr.name      = "EthDB event thread";
    threadAttr.stackSize = 32 * 1024;
    threadAttr.priority  = 128;
    ixOsalMutexLock(&eventQueueLock, IX_OSAL_WAIT_FOREVER);
    RESET_QUEUE(&eventQueue);
    ixOsalMutexUnlock(&eventQueueLock);
    if (ixOsalSemaphoreInit(&eventQueueSemaphore, 0) != IX_SUCCESS)
    {
        return IX_ETH_DB_FAIL;
    }
    ixEthDBLearningShutdown = FALSE;
    if (ixOsalThreadCreate(&eventProcessorThread, &threadAttr, ixEthDBEventProcessorLoop, NULL) != IX_SUCCESS)
    {
        return IX_ETH_DB_FAIL;
    }
    ixOsalThreadStart(&eventProcessorThread);
    return IX_ETH_DB_SUCCESS;
}