您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CL_DEBUG_PRINT函数代码示例

51自学网 2021-06-01 20:02:36
  C++
这篇教程C++ CL_DEBUG_PRINT函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中CL_DEBUG_PRINT函数的典型用法代码示例。如果您正苦于以下问题:C++ CL_DEBUG_PRINT函数的具体用法?C++ CL_DEBUG_PRINT怎么用?C++ CL_DEBUG_PRINT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了CL_DEBUG_PRINT函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: clBitmapRealloc

static ClRcTclBitmapRealloc(ClBitmapInfoT  *pBitmapInfo,                 ClUint32T      bitNum){    ClRcT      rc     = CL_OK;    ClUint32T  nBytes = 0;    ClUint32T  nInit  = 0;    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Enter: %u", bitNum));    nBytes = bitNum / CL_BM_BITS_IN_BYTE;    ++nBytes; /* bitNum is 0-based */    pBitmapInfo->pBitmap = clHeapRealloc(pBitmapInfo->pBitmap, nBytes);     if( NULL == pBitmapInfo->pBitmap )    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("clHeapRealloc() failed"));        return CL_BITMAP_RC(CL_ERR_NO_MEMORY);     }    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Reallocated: %u from %u", nBytes,                    pBitmapInfo->nBytes));    nInit = nBytes - pBitmapInfo->nBytes;    memset(&(pBitmapInfo->pBitmap[pBitmapInfo->nBytes]), 0, nInit);    pBitmapInfo->nBytes = nBytes;    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Exit"));    return rc;}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:28,


示例2: cosSysvShmSizeGet

ClRcTcosSysvShmSizeGet(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);}
开发者ID:rajiva,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:31,


示例3: clMemPartRealloc

ClPtrT clMemPartRealloc(ClMemPartHandleT handle, ClPtrT memBase, ClUint32T size){    MEM_PART_STATS memPartStats;    ClPtrT mem = NULL;    ClMemPartT *pMemPart = NULL;    ClRcT rc = CL_OK;    if(!(pMemPart = (ClMemPartT*)handle) )        return NULL;    if(!size) size = 16;    clOsalMutexLock(&pMemPart->mutex);    if(memPartInfoGet(pMemPart->partId, &memPartStats) == ERROR)    {        clOsalMutexUnlock(&pMemPart->mutex);        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("memPartInfoGet for size [%d] failed with [%s]/n", size, strerror(errno)));        return mem;    }    if(size >= memPartStats.numBytesFree)    {        if( (rc = clMemPartExpand(pMemPart, CL_MEM_PART_EXPANSION_SIZE) ) != CL_OK)        {            /* do nothing now and fall back to realloc.*/        }    }    mem = memPartRealloc(pMemPart->partId, memBase, size);    clOsalMutexUnlock(&pMemPart->mutex);    if(!mem)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Mem part realloc failure for size [%d]/n", size));        CL_ASSERT(0);    }    return mem;}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:35,


示例4: omValidateHandle

/** *NOT AN EXTERNAL API. PLEASE DO NOT DOCUMENT. *                                                                        * Validates the object handle that is provided as an input argument to * this routine. */ClRcTomValidateHandle(ClHandleT handle){	ClOmClassControlBlockT * pTab;	ClOmClassTypeT   classId = CL_OM_HANDLE_TO_CLASSID(handle);	ClUint32T instId  = CL_OM_HANDLE_TO_INSTANCEID(handle);    CL_FUNC_ENTER();    /* validate the input argument class Id field */	if (omClassTypeValidate(classId) != CL_OK)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR,                ("Invalid classID field within handle argument"));	return (CL_OM_SET_RC(CL_OM_ERR_INVALID_CLASS));    }    pTab = clOmClassEntryGet(classId);	CL_ASSERT(pTab);    if (instId > pTab->maxObjInst)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR,                ("Invalid instance ID field within handle argument"));	return (CL_OM_SET_RC(CL_OM_ERR_INVALID_OBJ_INSTANCE));    }    if (!mGET_REAL_ADDR(pTab->pInstTab[instId]))    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR,                ("The Instance Table for this class is not initialized"));	return (CL_OM_SET_RC(CL_OM_ERR_INSTANCE_TAB_NOINIT));    }    CL_FUNC_EXIT();    return (CL_OK);}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:41,


示例5: cosSysvShmSecurityModeGet

ClRcTcosSysvShmSecurityModeGet(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);}
开发者ID:rajiva,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:32,


示例6: clOmNumberOfOmClassInstancesGet

/** * Get number of instances for given OM. * * This routine returns the total number of instances that are managed * by Object Manager for given class. * * @param handle - OM Handle * @param numInstances - [OUT]number of instances the class has * * @returns CL_OK if number of instances could be obtained successfully * @returns  CL_OM_ERR_INVALID_CLASS if the class passed by means of handle is *								is not valid */ClRcTclOmNumberOfOmClassInstancesGet(ClHandleT handle, ClUint32T *numInstances){	ClOmClassTypeT classId = CL_OM_HANDLE_TO_CLASSID(handle);	ClOmClassControlBlockT * pTab = NULL;	CL_FUNC_ENTER();	CL_ASSERT(numInstances);        /* sanity check for input parameters */        if(numInstances == NULL)        {		CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("NULL input argument"));		return (CL_OM_SET_RC(CL_OM_ERR_NULL_PTR));	}	if (omClassTypeValidate(classId) != CL_OK)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR,                ("Invalid classID field within handle argument"));	return (CL_OM_SET_RC(CL_OM_ERR_INVALID_CLASS));    }    pTab = clOmClassEntryGet(classId);	CL_ASSERT(pTab);	*numInstances = pTab->curObjCount;	CL_FUNC_EXIT();	return (CL_OK);}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:42,


示例7: clOmObjectReferenceByOmHandleGet

/** * Get OM object reference given handle * * This routine returns the reference to the OM object, from the input * OM object handle * * @param pThis - OM Object Handle * @param objRef - [OUT]Object reference * * @returns CL_OK if number of instances could be obtained successfully * @returns  CL_OM_ERR_INVALID_OBJ_HANDLE if the object handle passed *								is not valid */ClRcT clOmObjectReferenceByOmHandleGet(ClHandleT pThis, void **objRef){	ClOmClassControlBlockT * 	pTab = NULL;	ClOmClassTypeT     classId;	ClUint32T    	instId;	CL_FUNC_ENTER();	CL_ASSERT(pThis);	CL_ASSERT(objRef);	if (!objRef)	{		CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("NULL pointer passed"));		return (CL_OM_SET_RC(CL_OM_ERR_INVALID_OBJ_REF));	}	if (omValidateHandle(pThis) != CL_OK)	{             CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Invalid input handle argument"));	     return (CL_OM_SET_RC(CL_OM_ERR_INVALID_OBJ_HANDLE));	}	classId = CL_OM_HANDLE_TO_CLASSID(pThis);	instId  = CL_OM_HANDLE_TO_INSTANCEID(pThis);        pTab = clOmClassEntryGet(classId);	CL_ASSERT(pTab);	*objRef = (char *)mGET_REAL_ADDR(pTab->pInstTab[instId]);	return (CL_OK);}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:44,


示例8: timeStamp

void timeStamp(ClCharT timeStr [], ClUint32T    len){    time_t  timer ;    struct  tm *t = NULL;    ClCharT * pBuff =NULL;   struct tm *localtimebuf = clHeapAllocate(sizeof(struct tm));;   if(localtimebuf == NULL)   {      CL_DEBUG_PRINT(CL_DEBUG_ERROR,( "/nMemory Allocation failed/n"));      return ;   }   ClCharT *asctimebuf   = clHeapAllocate(BUFFER_LENGTH*sizeof(ClCharT));   if(asctimebuf == NULL)   {      CL_DEBUG_PRINT(CL_DEBUG_ERROR,( "/nMemory Allocation failed/n"));      return ;   }   memset(&timer,0,sizeof(time_t));    time(&timer);    t = localtime_r(&timer,localtimebuf);    pBuff=asctime_r(t,asctimebuf);    strncpy(timeStr,pBuff,len-1);    timeStr[strlen(timeStr) - 1] ='/0';	clHeapFree(localtimebuf);	clHeapFree(asctimebuf);}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:28,


示例9: clOmObjectByReferenceDelete

/** * Delete OM object given reference. * * This routine deletes the object given an input reference to the object * * @param pThis - Object reference of the object to be deleted. * * @returns CL_OK if the delete operation is successful * */ClRcTclOmObjectByReferenceDelete(void *pThis){    ClHandleT handle;    int rc;    CL_FUNC_ENTER();    CL_ASSERT(pThis);    if (!pThis)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("NULL pointer passed"));        return (CL_OM_SET_RC(CL_OM_ERR_INVALID_OBJ_REF));    }    handle = ((struct CL_OM_BASE_CLASS *)pThis)->__objType;    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("The Handle is %#llX, Obj reference = %p",                                    handle, pThis));    if ((rc = omCommonDeleteObj(handle, 1, CL_OM_DELETE_FLAG, NULL, 0)) !=            CL_OK)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Failed to delete OM object"));        return (CL_OM_SET_RC(CL_OM_ERR_INVALID_OBJ_REF));    }    return (CL_OK);}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:38,


示例10: dbalGetLibName

ClRcT dbalGetLibName(ClCharT  *pLibName){    ClParserPtrT   parent     = NULL ;   /*parent*/    ClParserPtrT   engineType = NULL ;   /*parser ptr to Component*/    ClParserPtrT   libName    = NULL ;   /*parser ptr to ckptName*/    ClParserPtrT   fileName    = NULL ;   /*parser ptr to ckptName*/    ClRcT          rc         = CL_OK;    ClCharT       *configPath = NULL;    configPath = getenv("ASP_CONFIG");    if (configPath != NULL)    {        parent    = clParserOpenFile(configPath, "clDbalConfig.xml");        if (parent == NULL)        {          CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Xml file for config is not proper rc [0x %x]/n",rc));          return CL_ERR_NULL_POINTER;        }    }    else    {        rc = CL_ERR_NULL_POINTER;        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("ASP_CONFIG path is not set in the environment irc[0x %x] /n",rc));    }    if(parent != NULL)    {       engineType = clParserChild(parent,"Dbal");       libName    = clParserChild(engineType,"Engine");       fileName   = clParserChild(libName,"FileName");    }    if(fileName != NULL && pLibName != NULL)      strcpy(pLibName, fileName->txt);     if (parent != NULL) clParserFree(parent);    return rc;}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:35,


示例11: heapAllocateDebug

/* The debug versions of the heap routines */staticClPtrTheapAllocateDebug(        ClUint32T size){    ClPtrT          pAddress    = NULL;    ClPoolConfigT*  pPoolConfig = NULL;    ClPoolConfigT   poolKey     = { 0 };    ClPoolT         poolHandle;    ClPtrT           pCookie     = NULL;    ClRcT           rc;    ClUint32T       overhead    = 0;    /* Add the overhead over here for debug allocation.  */    CL_HEAP_OVERHEAD_DEBUG (overhead);    size += overhead;    poolKey.chunkSize = size;    /*     * Do a binary search to get an index into the chunk config and hence     * pool handle to allocate from.     */    rc = clBinarySearch ((ClPtrT)&poolKey, gHeapList.heapConfig.pPoolConfig,            gHeapList.heapConfig.numPools, sizeof (ClPoolConfigT),            clPoolCmp, (ClPtrT*)&pPoolConfig);    if (rc != CL_OK)    {        CL_HEAP_MEM_TRACKER_TRACE(NULL,size);        CL_DEBUG_PRINT (CL_DEBUG_ERROR,                ("Error in getting pool handle for size:%d/n", size));        goto out;    }    poolHandle = gHeapList.pPoolHandles [        pPoolConfig - gHeapList.heapConfig.pPoolConfig ];    rc = clPoolAllocate (poolHandle, (ClUint8T**) &pAddress, &pCookie);    if (rc != CL_OK)    {        CL_HEAP_MEM_TRACKER_TRACE(NULL,size);        CL_DEBUG_PRINT (CL_DEBUG_ERROR,                ("Error allocating memory from pool size:%d for input "                 "size:%d/n", pPoolConfig->chunkSize, size));        goto out;    }    CL_HEAP_MEM_TRACKER_ADD (pAddress, pPoolConfig->chunkSize, pCookie);    size -= overhead;    CL_HEAP_SET_DEBUG_COOKIE (pAddress, pPoolConfig->chunkSize, size, pCookie);    /*Zero off the contents till ASP gets cured*/    memset (pAddress, 0, size);    out:    return (ClPtrT)pAddress;}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:61,


示例12: clBitmapCreate

/* * clBitmapCreate() */ClRcTclBitmapCreate(ClBitmapHandleT  *phBitmap,                ClUint32T        bitNum){    ClRcT          rc           = CL_OK;    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Enter"));    if ( NULL == phBitmap)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Null Pointer"));        return CL_BITMAP_RC(CL_ERR_NULL_POINTER);    }    *phBitmap = clHeapRealloc(NULL, sizeof(ClBitmapInfoT));     if( NULL == *phBitmap)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("clHeapRealloc() failed"));        return CL_BITMAP_RC(CL_ERR_NO_MEMORY);     }        rc = clBitmapInfoInitialize(*phBitmap, bitNum);    if (rc != CL_OK)    {        clHeapFree(phBitmap);        return rc;    }        CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Exit"));    return rc; }
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:34,


示例13: clBitmapInfoInitialize

static ClRcT clBitmapInfoInitialize(ClBitmapInfoT  *pBitmapInfo,                        ClUint32T      bitNum){    ClRcT          rc           = CL_OK;        CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Enter"));    rc = clOsalMutexCreate(&(pBitmapInfo->bitmapLock));    if( CL_OK != rc )    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("clOsalMutexCreate() rc: %x", rc));        return rc;    }    pBitmapInfo->pBitmap  = NULL;    pBitmapInfo->nBytes   = 0;    pBitmapInfo->nBits    = 0;    pBitmapInfo->nBitsSet = 0;    rc = clBitmapRealloc(pBitmapInfo, bitNum);        if( CL_OK != rc )    {        clOsalMutexDelete(pBitmapInfo->bitmapLock);        return rc;    }    pBitmapInfo->nBits = bitNum + 1; /* bitNum is 0-based FIXME i felt this is                                      wrong*/    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Exit"));    return rc;}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:30,


示例14: clBitmap2BufferGet

ClRcTclBitmap2BufferGet(ClBitmapHandleT  hBitmap,                   ClUint32T        *pListLen,                   ClUint8T         **ppPositionList){    ClBitmapInfoT  *pBitmapInfo = hBitmap;    ClRcT          rc           = CL_OK;    if( CL_BM_INVALID_BITMAP_HANDLE == hBitmap )    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Invalid Handle"));        return CL_BITMAP_RC(CL_ERR_INVALID_HANDLE);    }    rc = clOsalMutexLock(pBitmapInfo->bitmapLock);    if( CL_OK != rc )    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("clOsalMutexLock() rc: %x", rc));         return rc;    }    *ppPositionList = clHeapCalloc(pBitmapInfo->nBytes, sizeof(ClUint8T));    if( NULL == *ppPositionList )    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("clHeapCalloc()"));        clOsalMutexUnlock(pBitmapInfo->bitmapLock);        return rc;    }    memcpy(*ppPositionList, pBitmapInfo->pBitmap, pBitmapInfo->nBytes);    *pListLen = pBitmapInfo->nBytes;    clOsalMutexUnlock(pBitmapInfo->bitmapLock);    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Exit"));    return rc;}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:34,


示例15: clOmClassNameGet

/** * Get class name *  * Gives class name given the OM Handle. * * @param handle - OM Handle * @param nameBuf - [OUT]Buffer where class name is copied * * @returns CL_OK if the handle is valid and class name is obtained *					successfully *@returns CL_OM_ERR_INVALID_OBJ_HANDLE if the passed object handle  *					 is invalid */ClRcTclOmClassNameGet(ClHandleT handle, char *nameBuf){	ClOmClassControlBlockT * pTab = NULL;	CL_FUNC_ENTER();	CL_ASSERT(nameBuf);	if (omValidateHandle(handle) != CL_OK)	{		CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Invalid input handle argument"));		return (CL_OM_SET_RC(CL_OM_ERR_INVALID_OBJ_HANDLE));	}	if (!nameBuf)	{		CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("NULL name buffer passed"));		return (CL_ERR_NULL_POINTER);	}    pTab = clOmClassEntryGet(CL_OM_HANDLE_TO_CLASSID(handle));	CL_ASSERT(pTab);	strcpy(nameBuf, (const char*) pTab->className);	CL_FUNC_EXIT();	return (CL_OK);}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:38,


示例16: cosSysvMutexValueSet

ClRcTcosSysvMutexValueSet(ClOsalMutexIdT mutexId, ClInt32T value){    ClOsalMutexT *pMutex = (ClOsalMutexT *) mutexId;    ClRcT rc = CL_OK;    ClInt32T semId = pMutex->shared_lock.sem.semId;    ClInt32T err = 0;    CosSemCtl_t arg = {0};    CL_FUNC_ENTER();    if(value >= SEMVMX)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Error in setting sem value to [%d]/n", value));        rc = CL_OSAL_RC(CL_ERR_INVALID_PARAMETER);        goto out;    }    arg.val = value;    err = semctl(semId, 0, SETVAL, arg);    if(err < 0 )    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Mutex value set- semctl error: [%s]/n", strerror(errno)));        rc = CL_OSAL_RC(CL_ERR_LIBRARY);        goto out;    }    CL_FUNC_EXIT();out:    return rc;}
开发者ID:rajiva,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:30,


示例17: clOmParentClassGet

/** * This routine returns the class of the super class of the parent class */ClRcTclOmParentClassGet(ClHandleT handle, ClOmClassTypeT *peParentClass){	ClOmClassTypeT classId = CL_OM_HANDLE_TO_CLASSID(handle); 	ClOmClassControlBlockT * pTab = NULL;	CL_FUNC_ENTER();	/* sanity check for input parameters */	if(NULL == peParentClass)	{		CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("NULL input argument"));		return CL_OM_SET_RC(CL_OM_ERR_NULL_PTR);	}	if (omClassTypeValidate(classId) != CL_OK)	{		CL_DEBUG_PRINT(CL_DEBUG_ERROR,					("Invalid classID field within handle argument"));		return CL_OM_SET_RC(CL_OM_ERR_INVALID_CLASS);	}	pTab = clOmClassEntryGet(classId);	if(NULL == pTab)	{		CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Class Entry not found for classId %d/n",classId));		return CL_OM_SET_RC(CL_OM_ERR_INVALID_CLASS);	}	*peParentClass = pTab->eParentObj;	CL_FUNC_EXIT();	return CL_OK;}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:35,


示例18: cosSysvShmAttach

ClRcTcosSysvShmAttach(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);}
开发者ID:rajiva,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:33,


示例19: clOmClassVersionGet

/** * Get class version * * This routine returns the current version that is associated with the * class of objects. * * @param handle - OM handle * @param version - [OUT] Version of th class * * @returns CL_OK if number of instances could be obtained successfully * @returns  CL_OM_ERR_INVALID_CLASS if the class passed by means of handle is *								is not valid */ClRcTclOmClassVersionGet(ClHandleT handle, ClUint32T *version){	ClOmClassTypeT classId = CL_OM_HANDLE_TO_CLASSID(handle);	ClOmClassControlBlockT * pTab = NULL;	CL_ASSERT(version);	CL_FUNC_ENTER();	if (omClassTypeValidate(classId) != CL_OK)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR,                ("Invalid classID field within handle argument"));	return (CL_OM_SET_RC(CL_OM_ERR_INVALID_CLASS));    }	if (!version)	{            CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("NULL version argument passed"));  	    return (CL_ERR_INVALID_PARAMETER);	}    pTab = clOmClassEntryGet(classId);	CL_ASSERT(pTab);	*version = pTab->vVersion;	CL_FUNC_EXIT();	return (CL_OK);}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:42,


示例20: cosSysvShmDetach

ClRcTcosSysvShmDetach(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);}
开发者ID:rajiva,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:28,


示例21: clOmOmHandleByObjectReferenceGet

/** * Get OM Handle given object reference. * * This routine returns the OM object handle, given the reference to the * om Object. * * @param pThis - Object reference. * @param pHandle - [OUT] Object handle for given object. * * @returns CL_OK if number of instances could be obtained successfully * @returns  CL_OM_ERR_INVALID_OBJ_HANDLE if the object handle passed *								is not valid */ ClRcT clOmOmHandleByObjectReferenceGet(void *pThis, ClHandleT *pHandle){	ClRcT		rc = CL_OK;#ifdef CL_DEBUG	ClUint8T	aFuncName[] = "clOmOmHandleByObjectReferenceGet()";#endif	CL_FUNC_ENTER();	if (!pThis)	{		CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("%s: NULL pointer passed/r/n", aFuncName));		rc = CL_OM_SET_RC(CL_OM_ERR_INVALID_OBJ_REF);		goto ERROR_CASE;	}	if (!pHandle)	{		CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("%s: NULL pointer passed/r/n", aFuncName));		rc = CL_OM_SET_RC(CL_OM_ERR_INVALID_OBJ_HANDLE);		goto ERROR_CASE;	}	*pHandle = ((struct CL_OM_BASE_CLASS *)pThis)->__objType;	return (CL_OK);	ERROR_CASE: 		if(pHandle)			*pHandle = 0;        return (rc);}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:45,


示例22: clMemPartExpand

static ClRcT clMemPartExpand(ClMemPartT *pMemPart, ClUint32T size){    STATUS rc = 0;    if(pMemPart->index >= CL_MEM_PART_EXPANSION_SLOTS)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Mem part out of expansion slots trying to expand for size [%d]/n", size));        return CL_ERR_NO_SPACE;    }    if(pMemPart->partitions[pMemPart->index])    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Mem part already expanded/n"));        return CL_ERR_UNSPECIFIED;    }    pMemPart->partitions[pMemPart->index] = malloc(size);    if(!pMemPart->partitions[pMemPart->index])    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Mem part expand calloc failure for size [%d]/n", size));        return CL_ERR_NO_MEMORY;    }    if( (rc = memPartAddToPool(pMemPart->partId, pMemPart->partitions[pMemPart->index], size) ) == ERROR )    {        free(pMemPart->partitions[pMemPart->index]);        pMemPart->partitions[pMemPart->index] = NULL;        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Mem part add to pool for size [%d] failed with [%s]/n",                                        size, strerror(errno)));        return CL_ERR_NO_MEMORY;    }    ++pMemPart->index;    return CL_OK;}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:30,


示例23: clCorDataSave

ClRcT clCorDataSave(){    ClRcT  rc = CL_OK;    corPersisInfo_t corData;	memset(&corData, 0, sizeof(corData));    CL_FUNC_ENTER();    CL_DEBUG_PRINT(CL_DEBUG_TRACE,("/n Inside clCorDataSave /n"));    /* corData.version   = CL_COR_VERSION_NO; */	CL_COR_VERSION_SET(corData.version);    corData.operation = COR_DATA_SAVE;        COR_CALL_RMD(COR_EO_PERSISTENCY_OP,                 VDECL_VER(clXdrMarshallcorPersisInfo_t, 4, 0, 0),                 &corData,                 sizeof(corData),                  VDECL_VER(clXdrUnmarshallcorPersisInfo_t, 4, 0, 0),                 NULL,                 NULL,                 rc);    if(rc != CL_OK)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ( "clCorDataSave returns error,rc=%x",rc));    }        CL_FUNC_EXIT();    return rc;}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:31,


示例24: 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.*/ClRcTdmClassDelete(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);}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:36,


示例25: clBitmapDestroy

ClRcTclBitmapDestroy(ClBitmapHandleT  hBitmap){    ClRcT          rc           = CL_OK;    ClBitmapInfoT  *pBitmapInfo = hBitmap;    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Enter"));    if( CL_BM_INVALID_BITMAP_HANDLE == hBitmap )    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Invalid Handle"));        return CL_BITMAP_RC(CL_ERR_INVALID_HANDLE);    }    do    {        rc = clOsalMutexDelete(pBitmapInfo->bitmapLock);    }while( CL_OSAL_ERR_MUTEX_EBUSY == rc );    clHeapFree(pBitmapInfo->pBitmap);    clHeapFree(pBitmapInfo);    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Exit"));    return rc;}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:25,


示例26: clTxnServiceCkptRecoveryLogRestore

/** * API to restore recovery logs of previously active transactions * from check-point */ClRcT clTxnServiceCkptRecoveryLogRestore(){    ClRcT       rc = CL_OK;    if(!clTxnServiceCfg->dsblCkpt)    {        SaNameT     txnCkptName;        CL_FUNC_ENTER();        txnCkptName.length = strlen(CL_TXN_CKPT_NAME) + 1;        memset(&(txnCkptName.value[0]), '/0', txnCkptName.length);        strncpy(&(txnCkptName.value[0]), CL_TXN_CKPT_NAME, txnCkptName.length);        CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Restoring transaction-recovery logs"));        /* AD-1: To use the checkpoint exists api to check whether its recovery or         * normal startup */        clLogDebug("SER", NULL,                   "Checkpoint exists, reading data for recovery");        rc = clCkptLibraryCkptDataSetRead(clTxnServiceCfg->txnCkptHandle, &txnCkptName,                                          CL_TXN_RECOVERY_DATA_SET, 0x0);        if (CL_OK != rc)        {            CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Failed to restore transaction-service state. rc:0x%x", rc));            rc = CL_GET_ERROR_CODE(rc);        }    }    CL_FUNC_EXIT();    return (rc);}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:36,


示例27: clAlarmPayloadCntDelete

/* * This api would be called as and when the object is no more and the corresponding entry  * within the container needs to be deleted. */ClRcT clAlarmPayloadCntDelete(ClCorMOIdPtrT pMoId, ClAlarmProbableCauseT probCause, ClAlarmSpecificProblemT specificProblem){	ClRcT rc = CL_OK;	ClCntNodeHandleT nodeH;    ClAlarmPayloadCntKeyT *pCntKey = clHeapAllocate(sizeof(ClAlarmPayloadCntKeyT));    if(NULL == pCntKey)    {          CL_DEBUG_PRINT (CL_DEBUG_CRITICAL,("Memory allocation failed with rc 0x%x ", rc));          return (rc);    }        pCntKey->probCause = probCause;    pCntKey->specificProblem = specificProblem;    pCntKey->moId = *pMoId;    clOsalMutexLock(gClAlarmPayloadCntMutex);            rc = clCntNodeFind(gPayloadCntHandle,(ClCntKeyHandleT)pCntKey,&nodeH);	if(CL_OK == rc)	{    	rc = clCntAllNodesForKeyDelete(gPayloadCntHandle,(ClCntKeyHandleT)pCntKey);    	if (CL_OK != rc)	    {        	CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("clCntAllNodesForKeyDelete failed w rc:0x%x/n", rc));	    }        	}	else	{		CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Node does not exist with rc:0x%x/n", rc));	}    clHeapFree(pCntKey);	clOsalMutexUnlock(gClAlarmPayloadCntMutex);    	return rc;}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:36,


示例28: clComponentTimerInit

ClRcT clComponentTimerInit(ClEoExecutionObjT* peoObj){    ClRcT    rc = CL_OK;    ClTimerTimeOutT     ComponentTimeOut = {0,0};        ComponentTimeOut.tsSec = 0;    ComponentTimeOut.tsMilliSec = COMPONENT_CALLBACK_TIME;        rc= clTimerCreate(ComponentTimeOut,                      CL_TIMER_ONE_SHOT,                      CL_TIMER_SEPARATE_CONTEXT,                      clComponentCallBack,                      (void*)peoObj,                      &gComponentTimerHandle);    if (CL_OK != rc)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, (" clTimerCreate failed with rc: 0x%x /n", rc));        return rc;    }    rc = clTimerStart(gComponentTimerHandle);    if (CL_OK != rc)    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR, (" clTimerStart failed with rc: 0x%x /n", rc));        return rc;    }    return rc;}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:31,


示例29: clNameContextCkptNameUnpack

ClRcTclNameContextCkptNameUnpack(ClBufferHandleT  inMsg){    ClRcT             rc      = CL_OK;    ClUint32T         key     = 0;    ClUint32T         size    = 0;    ClUint32T         count   = 0;    ClIocNodeAddressT localAddr = 0;    ClIocNodeAddressT masterAddr = 0;    CL_NAME_DEBUG_TRACE(("Enter"));    rc = clXdrUnmarshallClUint32T(inMsg, &size);    if( CL_OK != rc )    {        CL_DEBUG_PRINT(CL_DEBUG_ERROR,                ("clXdrUnmarshallClUint32T(): rc[0x %x]", rc));        return rc;    }        clLogDebug("SVR", "CKP", "Num of contexts: %d", size);    for( count = 0; count < size; count++)    {            rc = clXdrUnmarshallClUint32T(inMsg, &key);        if( CL_OK != rc )        {            return rc;        }            if( (key > CL_NS_DEFAULT_GLOBAL_CONTEXT) &&             (key < CL_NS_BASE_NODELOCAL_CONTEXT) )        {            localAddr = clIocLocalAddressGet();            rc = clCpmMasterAddressGet(&masterAddr);            if (rc != CL_OK)            {                CL_DEBUG_PRINT(CL_DEBUG_ERROR,("clCpmMasterAddressGet failed with rc 0x%x",rc));                return rc;            }            if( masterAddr == localAddr )            {                rc = clNameSvcCtxRecreate(key);                if( CL_OK != rc )                {                    return rc;                }                }            }            else        {                rc = clNameSvcCtxRecreate(key);            if( CL_OK != rc )            {                return rc;            }            }     }        CL_NAME_DEBUG_TRACE(("Exit"));    return rc;}    
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:59,


示例30: 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);}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:62,



注:本文中的CL_DEBUG_PRINT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ CL_Disconnect函数代码示例
C++ CL_DEBUG函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。