本文整理汇总了C++中CL_FUNC_EXIT函数的典型用法代码示例。如果您正苦于以下问题:C++ CL_FUNC_EXIT函数的具体用法?C++ CL_FUNC_EXIT怎么用?C++ CL_FUNC_EXIT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CL_FUNC_EXIT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dmClassDelete
/*Currently we are having another API clCorClassDelete for same purpose. However,
it takes class handle as input. If we plan to remove it. This will be useful.*/
ClRcT
dmClassDelete(ClCorClassTypeT id)
{
ClRcT ret = CL_OK;
CORClass_h tmp = 0;
CL_FUNC_ENTER();
if((!dmGlobal))
{
CL_FUNC_EXIT();
return(CL_COR_SET_RC(CL_COR_ERR_NULL_PTR));
}
CL_DEBUG_PRINT(CL_DEBUG_TRACE, ( "ClassDelete (Class:%04x)", id));
/* check if class already present
*/
HASH_GET(dmGlobal->classTable, id, tmp);
if(tmp)
{
ret = dmClassByHandleDelete(tmp);
}
else
{
CL_DEBUG_PRINT(CL_DEBUG_ERROR, ( "ClassDelete (Class:%04x) [Unknown class]",
id));
ret = CL_COR_SET_RC(CL_COR_ERR_CLASS_NOT_PRESENT);
}
CL_FUNC_EXIT();
return (ret);
}
示例2: cosSysvShmAttach
ClRcT
cosSysvShmAttach(ClOsalShmIdT shmId,void* pInMem, void** ppOutMem)
{
ClRcT retCode = 0;
void* pShared = NULL;
CL_FUNC_ENTER();
if(NULL == ppOutMem)
{
CL_DEBUG_PRINT (CL_DEBUG_INFO,("\nShared Memory Attach: FAILED"));
retCode = CL_OSAL_RC(CL_ERR_NULL_POINTER);
CL_FUNC_EXIT();
return(retCode);
}
pShared = shmat ((int)shmId, pInMem, 0);
if((void*)-1 == pShared)
{
CL_DEBUG_PRINT (CL_DEBUG_INFO,("\nShared Memory Attach: FAILED"));
retCode = CL_OSAL_RC(CL_OSAL_ERR_SHM_ATTACH);
CL_FUNC_EXIT();
return(retCode);
}
else
{
*ppOutMem = pShared;
}
CL_DEBUG_PRINT (CL_DEBUG_TRACE,("\nShared Memory Attach: DONE"));
CL_FUNC_EXIT();
return (CL_OK);
}
示例3: halDevObjCreate
ClRcT halDevObjCreate (ClUint32T deviceID,
void *pdevCapability,
ClUint32T devCapLen ,
ClUint32T maxRspTime,
ClUint32T bootUpPriority,
ClHalDeviceObjectH *const phalDevObj)
{
ClUint32T index=0 ;
ClUint32T i=0 ;
CL_FUNC_ENTER();
if(deviceID<=0)
{
clLogCritical(CL_LOG_AREA_UNSPECIFIED,CL_LOG_CONTEXT_UNSPECIFIED,"\nhalDevObjCreate Error Invalid DeviceId\n");
CL_FUNC_EXIT();
return(CL_HAL_SET_RC( CL_ERR_INVALID_PARAMETER)) ;
}
if(NULL ==phalDevObj)
{
clLogCritical(CL_LOG_AREA_UNSPECIFIED,CL_LOG_CONTEXT_UNSPECIFIED,"\n halDevObjCreate Error NULL for Device \
Object Handle\n") ;
CL_FUNC_EXIT();
return(CL_HAL_SET_RC(CL_ERR_NULL_POINTER));
}
示例4: cosSysvShmSizeGet
ClRcT
cosSysvShmSizeGet(ClOsalShmIdT shmId,ClUint32T* pSize)
{
struct shmid_ds shmSize ;
ClInt32T retCode = CL_OK;
CL_FUNC_ENTER();
if(NULL == pSize)
{
CL_DEBUG_PRINT (CL_DEBUG_TRACE,("\nShared Memory SecurityModeGet: FAILED"));
retCode = CL_OSAL_RC(CL_ERR_NULL_POINTER);
CL_FUNC_EXIT();
return(retCode);
}
/* Get the current values set and modifiy it */
retCode = shmctl ((int)shmId, IPC_STAT, &shmSize);
if(0 != retCode)
{
CL_DEBUG_PRINT (CL_DEBUG_TRACE,("\nShared Memory SecurityModeGet: FAILED"));
retCode = CL_OSAL_RC(CL_OSAL_ERR_SHM_SIZE);
CL_FUNC_EXIT();
return(retCode);
}
*pSize = (ClUint32T)shmSize.shm_segsz;
CL_FUNC_EXIT();
return (CL_OK);
}
示例5: clTimerTypeGet
ClRcT
clTimerTypeGet (ClTimerHandleT timerHandle,
ClUint32T* pTimerType)
{
/* make sure the timer actually exists */
TsTimer_t* pUserTimer = NULL;
ClRcT returnCode;
CL_FUNC_ENTER();
pUserTimer = (TsTimer_t*) timerHandle;
if (pUserTimer == NULL) {
/* debug message */
returnCode = CL_TIMER_RC(CL_ERR_INVALID_HANDLE);
clDbgCodeError(returnCode, ("Bad timer handle"));
CL_FUNC_EXIT();
return (returnCode);
}
if (pTimerType == NULL) {
CL_FUNC_EXIT();
return (CL_ERR_UNSPECIFIED);
}
/* extract the timer-type from the timer */
*pTimerType = pUserTimer->type;
CL_FUNC_EXIT();
return (CL_OK);
}
示例6: cdbGDBMRecordReplace
static ClRcT
cdbGDBMRecordReplace(ClDBHandleT dbHandle, /* Handle to the database */
ClDBKeyT dbKey, /* Handle to the key being added */
ClUint32T keySize, /* Size of the key being added */
ClDBRecordT dbRec, /* Handle to the record being added */
ClUint32T recSize) /* Size of the record being added */
{
ClRcT errorCode = CL_OK;
GDBMHandle_t* pGDBMHandle = (GDBMHandle_t*)dbHandle;
ClUint32T returnCode = 0;
datum key = {NULL, 0};
datum data = {NULL, 0};
CL_FUNC_ENTER();
key.dsize = keySize;
key.dptr = (ClCharT *)dbKey;
data.dsize = recSize;
data.dptr = (ClCharT *)dbRec;
/* Replace the record in the database */
returnCode = gdbm_store(pGDBMHandle->gdbmInstance, key, data, GDBM_REPLACE);
if(0 != returnCode) {
/* Some GDBM error occured. return DB error */
errorCode = CL_DBAL_RC(CL_DBAL_ERR_DB_ERROR);
CL_DEBUG_PRINT ( CL_DEBUG_TRACE,("\nGDBM replace failed"));
CL_FUNC_EXIT();
return(errorCode);
}
CL_FUNC_EXIT();
return(CL_OK);
}
示例7: clEsmInstanceContinue
/**
* Continue the extended state machine instance.
*
* This API to be called if the state machine is paused
* and events are just being queued and not being
* processed. This API puts the state machine instance
* back in regular processing mode.
*
* @param smThis State Machine Object
*
* @returns
* CL_OK on CL_OK (successful start) <br/>
* CL_SM_RC(CL_ERR_NULL_POINTER) on invalid/null instance handle <br/>
*
* @see #clEsmInstancePause
*/
ClRcT
clEsmInstanceContinue(ClExSmInstancePtrT smThis
)
{
ClRcT ret = CL_OK;
CL_FUNC_ENTER();
CL_ASSERT(smThis);
if(smThis && smThis->fsm)
{
if(!(ESM_IS_PAUSED(smThis)))
{
ret = SM_ERR_NOT_PAUSED;
CL_FUNC_EXIT();
return ret;
}
#ifdef DEBUG
clLogTrace(ESM_LOG_AREA,CL_LOG_CONTEXT_UNSPECIFIED,"Continue [%s]", smThis->fsm->name);
#endif
ESM_CONTINUE(smThis);
} else
{
ret = CL_SM_RC(CL_ERR_NULL_POINTER);
}
CL_FUNC_EXIT();
return ret;
}
示例8: cosSysvShmSecurityModeGet
ClRcT
cosSysvShmSecurityModeGet(ClOsalShmIdT shmId,ClUint32T* pMode)
{
struct shmid_ds shmPerm ;
ClInt32T retCode = CL_OK;
CL_FUNC_ENTER();
if(NULL == pMode)
{
CL_DEBUG_PRINT (CL_DEBUG_TRACE,("\nShared Memory SecurityModeGet: FAILED"));
retCode = CL_OSAL_RC(CL_ERR_NULL_POINTER);
CL_FUNC_EXIT();
return(retCode);
}
/* Get the current values set and modify it */
retCode = shmctl ((int)shmId, IPC_STAT, &shmPerm);
if(0 != retCode)
{
CL_DEBUG_PRINT (CL_DEBUG_TRACE,("\nShared Memory SecurityModeGet: FAILED"));
retCode = CL_OSAL_RC(CL_OSAL_ERR_SHM_MODE_GET);
CL_FUNC_EXIT();
return(retCode);
}
*pMode = shmPerm.shm_perm.mode;
CL_DEBUG_PRINT (CL_DEBUG_TRACE,("\nShared Memory SecurityModeGet: DONE"));
CL_FUNC_EXIT();
return (CL_OK);
}
示例9: cosSysvShmDetach
ClRcT
cosSysvShmDetach(void* pMem)
{
ClInt32T retCode = CL_OK;
CL_FUNC_ENTER();
if(NULL == pMem)
{
CL_DEBUG_PRINT (CL_DEBUG_TRACE,("\nShared Memory Detach: FAILED"));
retCode = CL_OSAL_RC(CL_ERR_NULL_POINTER);
CL_FUNC_EXIT();
return(retCode);
}
retCode = shmdt (pMem);
if(0 != retCode)
{
CL_DEBUG_PRINT (CL_DEBUG_TRACE,("\nShared Memory Detach: FAILED"));
retCode = CL_OSAL_RC(CL_OSAL_ERR_SHM_DETACH);
CL_FUNC_EXIT();
return(retCode);
}
CL_DEBUG_PRINT (CL_DEBUG_TRACE,("\nShared Memory Detach: DONE"));
CL_FUNC_EXIT();
return (CL_OK);
}
示例10: omClassEntryReload
/*
* Insert the class tab entry into the class id table.
*/
static ClRcT
omClassEntryReload (ClCharT *pClassName, ClOmClassTypeT classId)
{
ClRcT rc = CL_OK;
ClOmClassControlBlockT *pClassTab = NULL;
ClCntNodeHandleT nodeHandle = 0;
CL_FUNC_ENTER();
if(!pClassName)
{
rc = CL_OM_SET_RC(CL_OM_ERR_NULL_PTR);
CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("NULL PTR PASSED"));
CL_FUNC_EXIT();
return rc;
}
CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("OM entry reload for class = %s, class type %d", pClassName, classId));
/*
* First check if the class id entry is already present in the om class id table.
*/
if(clCntNodeFind(ghOmClassHashTbl, (ClCntKeyHandleT)(ClWordT)classId, &nodeHandle) == CL_OK)
return CL_OK;
/* Add this class entry into the OM class lookup table */
rc = clCntNodeFind(ghOmClassNameHashTbl, (ClCntKeyHandleT)pClassName, &nodeHandle);
if (rc != CL_OK)
{
CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Unable to find OM Class name [%s] entry in om class table",
pClassName));
return (rc);
}
rc = clCntNodeUserDataGet(ghOmClassNameHashTbl, nodeHandle, (ClCntDataHandleT*)&pClassTab);
if(rc != CL_OK)
{
CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Unable to get data for OM Class [%s] from om class name table",
pClassName));
return rc;
}
/*
* Insert this entry into the class id table.
*/
pClassTab->eMyClassType = classId;
rc = clCntNodeAdd(ghOmClassHashTbl, (ClCntKeyHandleT)(ClWordT)pClassTab->eMyClassType,
(ClCntDataHandleT)pClassTab, NULL);
if(rc != CL_OK)
{
CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Unable to add entry [%#x] for class [%s] to OM class id table",
classId, pClassName));
return rc;
}
CL_FUNC_EXIT();
return (rc);
}
示例11: clEvtFinalize
/*
* This function clean up the information which is it has
* 1. Deregister with CPM.
* 2. Deregister with debug.
* 3. Deregister with CKPT
* 4. Release the resources like Handle Databases, etc.
*/
ClRcT clEvtFinalize()
{
ClRcT rc = CL_OK;
CL_FUNC_ENTER();
CL_EVT_INIT_DONE_VALIDATION();
rc = clEoClientUninstallTables(gEvtHead.evtEOId, CL_EO_SERVER_SYM_MOD(gAspFuncTable, EVT));
if (rc != CL_OK)
{
CL_DEBUG_PRINT(CL_DEBUG_CRITICAL,
("Event: EO Client Uninstall failed [0x%X]\n\r", rc));
CL_FUNC_EXIT();
return rc;
}
rc = clEventDebugDeregister(gEvtHead.evtEOId);
if (rc != CL_OK)
{
CL_DEBUG_PRINT(CL_DEBUG_CRITICAL,
("Event: Debug Deregister failed [0x%X]\n\r", rc));
CL_FUNC_EXIT();
return rc;
}
/*
** Handle Database Cleanup.
*/
rc = clEvtHandleDatabaseExit();
if (rc != CL_OK)
{
CL_DEBUG_PRINT(CL_DEBUG_CRITICAL,
("Event: Handle Database Cleanup failed [0x%X]\n\r",
rc));
CL_FUNC_EXIT();
return rc;
}
#ifdef CKPT_ENABLED
/*
** Check Pointing Related Cleanup.
*/
clEvtCkptExit();
if (rc != CL_OK)
{
CL_DEBUG_PRINT(CL_DEBUG_CRITICAL,
("Event Ckpt Exit failed [0x%X]\n\r", rc));
CL_FUNC_EXIT();
return rc;
}
#endif
CL_FUNC_EXIT();
return CL_OK;
}
示例12: cdbGDBMNextRecordGet
static ClRcT
cdbGDBMNextRecordGet(ClDBHandleT dbHandle, /* Handle to the database */
ClDBKeyT currentKey, /* Handle to the current key */
ClUint32T currentKeySize, /* Size of the current key */
ClDBKeyT* pDBNextKey, /* pointer to handle in which the next key is returned */
ClUint32T* pNextKeySize, /* pointer to size in which the next key's size is returned */
ClDBRecordT* pDBNextRec, /* pointer to handle in which the next record is returned */
ClUint32T* pNextRecSize) /* pointer to size in which the next record's size is returned */
{
ClRcT errorCode = CL_OK;
GDBMHandle_t* pGDBMHandle = (GDBMHandle_t*)dbHandle;
datum key = {NULL, 0};
datum nextKey = {NULL, 0};
datum data = {NULL, 0};
CL_FUNC_ENTER();
NULL_CHECK(pDBNextKey);
NULL_CHECK(pNextKeySize);
NULL_CHECK(pDBNextRec);
NULL_CHECK(pNextRecSize);
key.dsize = currentKeySize;
key.dptr = (ClCharT *)currentKey;
/* Retrieve the next key */
nextKey = gdbm_nextkey(pGDBMHandle->gdbmInstance, key);
if(NULL == nextKey.dptr) {
/* The next key does not exist. So return error */
errorCode = CL_DBAL_RC(CL_ERR_NOT_EXIST);
CL_DEBUG_PRINT ( CL_DEBUG_TRACE,("\nGDBM get next key failed"));
CL_FUNC_EXIT();
return(errorCode);
}
*pDBNextKey = (ClDBKeyT)nextKey.dptr;
*pNextKeySize = nextKey.dsize;
/* retrieve the associated record */
data = gdbm_fetch(pGDBMHandle->gdbmInstance, nextKey);
if(NULL == data.dptr) {
errorCode = CL_DBAL_RC(CL_ERR_NOT_EXIST);
CL_DEBUG_PRINT ( CL_DEBUG_TRACE,("\nGDBM fetch record failed"));
CL_FUNC_EXIT();
return(errorCode);
}
*pDBNextRec = (ClDBRecordT)data.dptr;
*pNextRecSize = data.dsize;
CL_FUNC_EXIT();
return(CL_OK);
}
示例13: cosSysvSemCreate
ClRcT
cosSysvSemCreate (ClUint8T* pName, ClUint32T count, ClOsalSemIdT* pSemId)
{
ClInt32T retCode = CL_OK;
CosSemCtl_t semArg = {0};
ClUint32T len = 0;
ClUint32T key = 0;
ClInt32T semId = -1;
nullChkRet(pSemId);
nullChkRet(pName);
CL_FUNC_ENTER();
if ((count == 0) || count > CL_SEM_MAX_VALUE)
{
retCode = CL_OSAL_RC(CL_ERR_INVALID_PARAMETER);
clDbgCodeError(retCode, ("Number of semaphores to create (count) [%d] must be between [1] and [%d]", count, CL_SEM_MAX_VALUE));
CL_FUNC_EXIT();
return(retCode);
}
len = (ClUint32T)strlen ((ClCharT*)pName);
#if 0 /* Stone: why this limitation? */
if(len > 20)
if(len > 256)
{
CL_DEBUG_PRINT (CL_DEBUG_INFO,("Sanity check, semaphore name length is suspiciously long"));
retCode = CL_OSAL_RC(CL_OSAL_ERR_NAME_TOO_LONG);
CL_FUNC_EXIT();
return(retCode);
}
#endif
if(len > 256)
{
CL_DEBUG_PRINT (CL_DEBUG_INFO,("Sanity check, semaphore name [%s] is suspiciously long",pName));
}
retCode = (ClInt32T)clCrc32bitCompute (pName, len, &key, NULL);
CL_ASSERT(retCode == CL_OK); /* There is no possible error except for pName == NULL, which I've already checked, so don't check the retCode */
sysErrnoChkRet(semId = semget ((key_t)key, (int)count, IPC_CREAT|0666));
semArg.val = (int)count;
/* Initialize all the semaphores to 0. This should never fail, because I just created the semaphores */
sysErrnoChkRet(semctl (semId, 0, SETVAL, semArg));
*pSemId = (ClOsalSemIdT)semId;
CL_FUNC_EXIT();
return (CL_OK);
}
示例14: cosSysvShmIdGet
ClRcT
cosSysvShmIdGet(ClUint8T* pName, ClOsalShmIdT* pShmId)
{
ClUint32T key = 0;
ClUint32T len = 0;
ClUint32T size = 0;
ClInt32T shmId = 0;
ClRcT retCode = CL_OK;
CL_FUNC_ENTER();
if(NULL == pShmId)
{
CL_DEBUG_PRINT (CL_DEBUG_INFO,("\nShared Memory ID Get: FAILED"));
retCode = CL_OSAL_RC(CL_ERR_NULL_POINTER);
CL_FUNC_EXIT();
return(retCode);
}
if(NULL == pName)
{
CL_DEBUG_PRINT (CL_DEBUG_INFO,("\nShared Memory ID Get: FAILED"));
retCode = CL_OSAL_RC(CL_ERR_NULL_POINTER);
CL_FUNC_EXIT();
return(retCode);
}
len = (ClUint32T)strlen ((ClCharT*)pName);
retCode = clCrc32bitCompute (pName, len, &key, NULL);
if(CL_OK != retCode)
{
CL_DEBUG_PRINT (CL_DEBUG_INFO,("\nShared Memory ID Get: FAILED"));
retCode = CL_OSAL_RC(CL_OSAL_ERR_SHM_ID_GET);
CL_FUNC_EXIT();
return(retCode);
}
shmId = shmget ((key_t)key, size, (0666 | IPC_CREAT));
if(shmId < 0)
{
CL_DEBUG_PRINT (CL_DEBUG_INFO,("\nShared Memory ID Get: FAILED"));
retCode = CL_OSAL_RC(CL_OSAL_ERR_SHM_ID_GET);
CL_FUNC_EXIT();
return(retCode);
}
*pShmId = (ClOsalShmIdT)shmId;
CL_DEBUG_PRINT (CL_DEBUG_TRACE,("\nShared Memory ID Get: DONE"));
CL_FUNC_EXIT();
return (CL_OK);
}
示例15: clEsmInstanceEventAdd
/**
* Add event to the event q.
*
* API to add event to the state machine instance queue. The
* event properties are copied (a new event is created and
* the contents of the event passed a re copied to the new
* event), but the payload is just referenced and not copied.
*
* @param smThis Extended State machine Instance handle
* @param msg Event information
*
* @returns
* CL_OK on CL_OK <br/>
* CL_SM_RC(CL_ERR_NO_MEMORY) on memory allocation FAILURE <br/>
* CL_SM_RC(CL_ERR_NULL_POINTER) on invalid/null instance handle <br/>
*
* @see #clEsmInstanceProcessEvent
* @see #clEsmInstanceProcessEvents
*
*/
ClRcT
clEsmInstanceEventAdd(ClExSmInstancePtrT smThis,
ClSmEventPtrT msg
)
{
ClRcT ret = CL_OK;
CL_FUNC_ENTER();
CL_ASSERT(smThis);
CL_ASSERT(msg);
if(smThis && msg)
{
ClSmQueueItemPtrT item;
item = (ClSmQueueItemPtrT) mALLOC(sizeof(ClSmQueueItemT));
if(!item)
{
ret = CL_SM_RC(CL_ERR_NO_MEMORY);
}
else
{
if(ESM_LOCK(smThis)!=CL_OK)
{
ret = SM_ERR_LOCKED;
mFREE(item);
CL_FUNC_EXIT();
return ret;
}
item->event = *msg;
if (ESM_IS_PAUSED(smThis) && ESM_IS_DROP_ON_PAUSE(smThis))
{
ret = CL_OK;
mFREE(item);
ESM_UNLOCK(smThis);
CL_FUNC_EXIT();
return ret;
}
ret = SMQ_ENQUEUE(smThis->q, item);
clLogTrace(ESM_LOG_AREA,ESM_LOG_CTX_EVENT,"Event %d added => ret [%d]",
item->event.eventId,
ret);
ESM_UNLOCK(smThis);
}
} else
{
ret = CL_SM_RC(CL_ERR_NULL_POINTER);
}
CL_FUNC_EXIT();
return ret;
}