//------------------------------------------------------------------------------
static void* eventThread(void* arg_p)
{
    tEvent*     pEvent;
    int         ret;
    char        eventBuf[sizeof(tEvent) + MAX_EVENT_ARG_SIZE];

    UNUSED_PARAMETER(arg_p);

    pEvent = (tEvent*)eventBuf;

    while (!instance_l.fStopThread)
    {
        ret = ioctl(instance_l.fd, PLK_CMD_GET_EVENT, eventBuf);
        if (ret == 0)
        {
            /*TRACE("%s() User: got event type:%d(%s) sink:%d(%s)\n", __func__,
                    pEvent->eventType, debugstr_getEventTypeStr(pEvent->eventType),
                    pEvent->eventSink, debugstr_getEventSinkStr(pEvent->eventSink));*/
            if (pEvent->eventArgSize != 0)
                pEvent->eventArg.pEventArg = (char*)pEvent + sizeof(tEvent);

            ret = eventu_process(pEvent);
        }
        /*else
            TRACE("%s() ret = %d\n", __func__, ret);*/
    }
    instance_l.fStopThread = FALSE;

    return NULL;
}
//------------------------------------------------------------------------------
tOplkError eventucal_postUserEvent(const tEvent* pEvent_p)
{
    tOplkError  ret;

    // Check parameter validity
    ASSERT(pEvent_p != NULL);

    ret = eventu_process(pEvent_p);

    return ret;
}
//------------------------------------------------------------------------------
tOplkError eventucal_postUserEvent(tEvent* pEvent_p)
{
    tOplkError      ret;

    /*TRACE("UINT  type:%s(%d) sink:%s(%d) size:%d!\n",
                   debugstr_getEventTypeStr(pEvent_p->eventType), pEvent_p->eventType,
                   debugstr_getEventSinkStr(pEvent_p->eventSink), pEvent_p->eventSink,
                   pEvent_p->eventArgSize);*/
    ret = eventu_process(pEvent_p);

    return ret;
}