当前位置: 首页>>代码示例>>C++>>正文


C++ clOsalMutexUnlock函数代码示例

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


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

示例1: 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,代码来源:clMemPart.c

示例2: clBitmap2BufferGet

ClRcT
clBitmap2BufferGet(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,代码来源:clBitmap.c

示例3: cpmClusterTrackCallBack

void cpmClusterTrackCallBack(ClGmsHandleT handle, const ClGmsClusterNotificationBufferT *clusterNotificationBuffer, ClUint32T nMembers, ClRcT rc)
{
    clLogMultiline(CL_LOG_SEV_DEBUG, CPM_LOG_AREA_CPM, CPM_LOG_CTX_CPM_GMS,
                   "Received cluster track callback from GMS on node [%s] -- \n"
                   "Leader : [%d] \n"
                   "Deputy : [%d] (-1 -> No deputy) \n"
                   "Leader changed ? [%s] \n"
                   "Number of nodes in callback : [%d]",
                   gpClCpm->pCpmLocalInfo->nodeName,
                   clusterNotificationBuffer->leader,
                   clusterNotificationBuffer->deputy,
                   clusterNotificationBuffer->leadershipChanged ? "Yes" : "No",
                   clusterNotificationBuffer->numberOfItems);

    clOsalMutexLock(&gpClCpm->cpmGmsMutex);
    gpClCpm->trackCallbackInProgress = CL_TRUE;
    clOsalMutexUnlock(&gpClCpm->cpmGmsMutex);
    cpmHandleGroupInformation(clusterNotificationBuffer);

    rc = clOsalMutexLock(&gpClCpm->cpmGmsMutex);
    gpClCpm->trackCallbackInProgress = CL_FALSE;
    CL_CPM_CHECK_1(CL_LOG_SEV_ERROR, CL_CPM_LOG_1_OSAL_MUTEX_LOCK_ERR, rc, rc,
                   CL_LOG_HANDLE_APP);
    rc = clOsalCondSignal(&gpClCpm->cpmGmsCondVar);
    CL_CPM_CHECK_1(CL_LOG_SEV_ERROR, CL_CPM_LOG_1_OSAL_COND_SIGNAL_ERR, rc, rc,
                   CL_LOG_HANDLE_APP);
    rc = clOsalMutexUnlock(&gpClCpm->cpmGmsMutex);
    CL_CPM_CHECK_1(CL_LOG_SEV_ERROR, CL_CPM_LOG_1_OSAL_MUTEX_UNLOCK_ERR, rc, rc,
                   CL_LOG_HANDLE_APP);
failure:
    return;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:32,代码来源:clCpmGms.c

示例4: tsAllActiveTimersPrint

void
tsAllActiveTimersPrint (void)
{
    ClRcT returnCode = CL_ERR_INVALID_HANDLE;
    ClUint32T count = 0;
    TsTimer_t* pUserTimer = NULL;

    returnCode = clOsalMutexLock (gActiveTimerQueue.timerMutex);

    if (returnCode != CL_OK) {
        return;
    }

    if (gActiveTimerQueue.pFirstTimer == NULL) {
        /* no elements to display */
        returnCode = clOsalMutexUnlock (gActiveTimerQueue.timerMutex);
        return;
    }

    for (pUserTimer = gActiveTimerQueue.pFirstTimer, count = 0;
            pUserTimer != NULL;
            pUserTimer = pUserTimer->pNextActiveTimer, count++) {
        clOsalPrintf ("(%d) Timer timeout = %us, timestamp->sec = %ld, timestamp->Microsec = %ld.\n",
                      (ClInt32T)count,
                      pUserTimer->timeOut.tsSec,
                      pUserTimer->timestamp/1000000ULL,
                      pUserTimer->timestamp%1000000ULL);
    }

    returnCode = clOsalMutexUnlock (gActiveTimerQueue.timerMutex);
}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:31,代码来源:clTimerOld.c

示例5: clTimerStop

ClRcT
clTimerStop (ClTimerHandleT  timerHandle)
{
    /* make sure the timer actually exists */
    ClRcT returnCode = CL_ERR_INVALID_HANDLE;
    TsTimer_t* pUserTimer = NULL;

    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 (pUserTimer->state == TIMER_FREE) {
        returnCode = CL_TIMER_RC(CL_TIMER_ERR_INVALID_TIMER);
        clDbgCodeError(returnCode, ("Attempt to stop a deleted timer."));
        CL_FUNC_EXIT();
        return (returnCode);
    }

    /* if the timer is active, remove it from the active-timers queue */
    if (pUserTimer->state == TIMER_ACTIVE) {
        returnCode = clOsalMutexLock (gActiveTimerQueue.timerMutex);
        if (returnCode != CL_OK) {
            CL_FUNC_EXIT();
            return (returnCode);
        }

        returnCode = tsActiveTimerDequeue (pUserTimer);
        if (returnCode != CL_OK) {
            if(CL_OK != clOsalMutexUnlock (gActiveTimerQueue.timerMutex)) {
                CL_FUNC_EXIT();
                return(returnCode);
            }
            CL_FUNC_EXIT();
            return (returnCode);
        }

        returnCode = clOsalMutexUnlock (gActiveTimerQueue.timerMutex);
        if (returnCode != CL_OK) {
            CL_FUNC_EXIT();
            return (returnCode);
        }
    }

    /* mark the timer as inactive */
    pUserTimer->state = TIMER_INACTIVE;

    CL_FUNC_EXIT();
    return (CL_OK);
}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:56,代码来源:clTimerOld.c

示例6: clBitmapIsBitSet

/*
 * clBitmapIsBitSet()
 */
ClInt32T 
clBitmapIsBitSet(ClBitmapHandleT  hBitmap,
                 ClUint32T        bitNum,
                 ClRcT            *pRetCode) 
{
    ClBitmapInfoT  *pBitmapInfo = hBitmap;
    ClUint32T      elementIdx   = 0;
    ClUint32T      bitIdx       = 0;
    ClInt32T       bitVal       = CL_BM_BIT_UNDEF;
    
    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Enter"));

    if( NULL == pRetCode )
    {
        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("NULL value"));
        return bitVal;
    }

    if( CL_BM_INVALID_BITMAP_HANDLE == hBitmap )
    {
        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Invalid Handle"));
        *pRetCode = CL_BITMAP_RC(CL_ERR_INVALID_HANDLE);
        return bitVal;
    }

    *pRetCode = clOsalMutexLock(pBitmapInfo->bitmapLock);
    if( CL_OK != *pRetCode )
    {
        CL_DEBUG_PRINT(CL_DEBUG_ERROR, 
                       ("clOsalMutexLock() rc: %x", *pRetCode)); 
        return bitVal;
    }

    if( bitNum >= pBitmapInfo->nBits )
    {
        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Invalid Position"));
        clOsalMutexUnlock(pBitmapInfo->bitmapLock);
        *pRetCode = CL_BITMAP_RC(CL_ERR_INVALID_PARAMETER);
        return bitVal;
    }

    elementIdx = bitNum / CL_BM_BITS_IN_BYTE;
    bitIdx = bitNum % CL_BM_BITS_IN_BYTE;
    bitVal = ((pBitmapInfo->pBitmap)[elementIdx] & (0x1 << bitIdx)) ? 
              CL_BM_BIT_SET : CL_BM_BIT_CLEAR;
    *pRetCode = CL_OK;

    clOsalMutexUnlock(pBitmapInfo->bitmapLock);
    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Exit"));
    return bitVal;
}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:54,代码来源:clBitmap.c

示例7: cpmInvocationAdd

ClRcT cpmInvocationAdd(ClUint32T cbType,
                       void *data,
                       ClInvocationT *invocationId,
                       ClUint32T flags)
{
    ClRcT rc = CL_OK;
    ClCpmInvocationT *temp = NULL;
    ClUint32T invocationKey = 0;

    if (cbType < 0x1LL || cbType >= CL_CPM_MAX_CALLBACK || invocationId == NULL)
        CL_CPM_CHECK(CL_LOG_SEV_ERROR, ("Invalid parameter passed \n"),
                     CL_CPM_RC(CL_ERR_INVALID_PARAMETER));

    temp =
            (ClCpmInvocationT *) clHeapAllocate(sizeof(ClCpmInvocationT));
    if (temp == NULL)
        CL_CPM_CHECK(CL_LOG_SEV_ERROR, ("Unable to allocate memory \n"),
                     CL_CPM_RC(CL_ERR_NO_MEMORY));

    clOsalMutexLock(gpClCpm->invocationMutex);

    invocationKey = gpClCpm->invocationKey++;
    CL_CPM_INVOCATION_ID_GET((ClUint64T) cbType, (ClUint64T) invocationKey,
                             *invocationId);

    temp->invocation = *invocationId;
    temp->data = data;
    temp->flags = flags;

    rc = clCntNodeAdd(gpClCpm->invocationTable, (ClCntKeyHandleT)&temp->invocation,
                      (ClCntDataHandleT) temp, NULL);
    if (rc != CL_OK)
    {
        clLogError("NEW", "INVOCATION", "Invocation add for key [%#llx] returned [%#x]", 
                   temp->invocation, rc);
        goto withLock;
    }

    clLogDebug("NEW", "INVOCATION", "Added entry for invocation [%#llx]", temp->invocation);

    clOsalMutexUnlock(gpClCpm->invocationMutex);
    return rc;

  withLock:
    clOsalMutexUnlock(gpClCpm->invocationMutex);
  failure:
    if (temp != NULL)
        clHeapFree(temp);

    return rc;
}
开发者ID:joaohf,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:51,代码来源:clCpmCommon.c

示例8: clBitmapNextClearBitSetNGet

ClRcT
clBitmapNextClearBitSetNGet(ClBitmapHandleT  hBitmap,
                            ClUint32T        length, 
                            ClUint32T        *pBitSet)
{
    ClRcT          rc           = CL_OK;
    ClBitmapInfoT  *pBitmapInfo = hBitmap;
    ClUint32T      byteIdx      = 0;
    ClUint32T      bitIdx       = 0;
    ClUint32T      bitNum       = 0;

    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);
    }

    rc = clOsalMutexLock(pBitmapInfo->bitmapLock);
    if( CL_OK != rc )
    {
        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("clOsalMutexLock() rc: %x", rc)); 
        return rc;
    }

    if( length >= pBitmapInfo->nBits )
    {
        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("Invalid length"));
        clOsalMutexUnlock(pBitmapInfo->bitmapLock);
        return CL_BITMAP_RC(CL_ERR_INVALID_PARAMETER);
    }

    for( bitNum = 0; bitNum < length; bitNum++)
    {
        byteIdx = bitNum / CL_BM_BITS_IN_BYTE;
        bitIdx  = bitNum % CL_BM_BITS_IN_BYTE;
        if( !( (*(pBitmapInfo->pBitmap + byteIdx)) & (0x1 << bitIdx)) )
        {
            (pBitmapInfo->pBitmap)[byteIdx] |= (0x1 << bitIdx);
            *pBitSet = bitNum;
            clOsalMutexUnlock(pBitmapInfo->bitmapLock);   
            return CL_OK;
        }
    }

    clOsalMutexUnlock(pBitmapInfo->bitmapLock);   
    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Exit"));
    return CL_BITMAP_RC(CL_ERR_INVALID_PARAMETER);
}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:50,代码来源:clBitmap.c

示例9: 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,代码来源:clAlarmPayloadCont.c

示例10: clEoClientCallbackDbFinalize

ClRcT clEoClientCallbackDbFinalize(void)
{
    ClRcT rc;
    ClUint32T i;
    
    rc = clOsalMutexLock(&gpCallbackDb.lock);
    if(rc != CL_OK)
    {
        /* Print a message here */
        return rc;
    }

    for(i = 0 ; i < gpCallbackDb.numRecs; i++)
    {
        if(gpCallbackDb.pDb[i] != NULL)
            clHeapFree(gpCallbackDb.pDb[i]);
    }

    clHeapFree(gpCallbackDb.pDb);

    gpCallbackDb.numRecs = 0;

    clOsalMutexUnlock(&gpCallbackDb.lock);

    return CL_OK;
}
开发者ID:rajiva,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:26,代码来源:clEoLibs.c

示例11: cpmNodeFind

/*
 * Called with the cpmTableMutex lock held.
 */
ClRcT cpmNodeFind(SaUint8T *name, ClCpmLT **cpmL)
{
    ClRcT rc = CL_OK;
    clOsalMutexLock(gpClCpm->cpmTableMutex);
    rc = cpmNodeFindLocked(name, cpmL);
    clOsalMutexUnlock(gpClCpm->cpmTableMutex);
    return rc;
}
开发者ID:joaohf,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:11,代码来源:clCpmCommon.c

示例12: clAmsMgmtOIDelete

ClRcT clAmsMgmtOIDelete(ClCorInstanceIdT instance, ClAmsEntityT *entity)
{
    ClAmsMgmtOICacheT *entry = NULL;
    if(!entity || entity->type > CL_AMS_ENTITY_TYPE_MAX)
        return CL_AMS_RC(CL_ERR_INVALID_PARAMETER);

    clOsalMutexLock(&gClAmsMgmtOICacheMutex);
    if(!(entry = clAmsMgmtOICacheFind(gClAmsMgmtOICacheTable[entity->type], instance, entity)))
    {
        clOsalMutexUnlock(&gClAmsMgmtOICacheMutex);
        return CL_AMS_RC(CL_ERR_NOT_EXIST);
    }
    hashDel(&entry->hash);
    clOsalMutexUnlock(&gClAmsMgmtOICacheMutex);
    clHeapFree(entry);
    return CL_OK;
}
开发者ID:joaohf,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:17,代码来源:clAmsMgmtOI.c

示例13: clBitmap2PositionListGet

ClRcT
clBitmap2PositionListGet(ClBitmapHandleT  hBitmap,
                         ClUint32T        *pListLen,
                         ClUint32T        **ppPositionList)
{
    ClBitmapInfoT  *pBitmapInfo = hBitmap;
    ClRcT          rc           = CL_OK;
    ClUint32T      count        = 0;
    ClUint32T      bitNum       = 0;
    ClUint32T      bitIdx       = 0;
    ClUint32T      byteIdx      = 0;

    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->nBitsSet, sizeof(ClUint32T));
    if( NULL == *ppPositionList )
    {
        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("clHeapCalloc()"));
        clOsalMutexUnlock(pBitmapInfo->bitmapLock);
        return rc;
    }
    for(bitNum = 0; bitNum < pBitmapInfo->nBits; bitNum++)
    {
       byteIdx = bitNum / CL_BM_BITS_IN_BYTE;
       bitIdx  = bitNum % CL_BM_BITS_IN_BYTE;
       if( (*(pBitmapInfo->pBitmap + byteIdx)) & (0x1 << bitIdx) )
       {
          (*ppPositionList)[count++] = bitNum;
       }
    }
    *pListLen = pBitmapInfo->nBitsSet;

    clOsalMutexUnlock(pBitmapInfo->bitmapLock);
    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Exit"));
    return rc;
}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:46,代码来源:clBitmap.c

示例14: clBitmapBitSet

ClRcT 
clBitmapBitSet(ClBitmapHandleT  hBitmap,
               ClUint32T        bitNum)
{
    ClRcT          rc           = CL_OK;
    ClBitmapInfoT  *pBitmapInfo = hBitmap;
    ClUint32T      elementIdx   = 0;
    ClUint32T      bitIdx       = 0;

    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);
    }

    rc = clOsalMutexLock(pBitmapInfo->bitmapLock);
    if( CL_OK != rc )
    {
        CL_DEBUG_PRINT(CL_DEBUG_ERROR, ("clOsalMutexLock() rc: %x", rc)); 
        return rc;
    }

    if( bitNum >= (pBitmapInfo->nBytes * CL_BM_BITS_IN_BYTE) )
    {
        rc = clBitmapRealloc(pBitmapInfo, bitNum);
        if( CL_OK != rc )
        { 
    	    clOsalMutexUnlock(pBitmapInfo->bitmapLock);
            return rc;
        }
    }
    if( bitNum >= pBitmapInfo->nBits )
    {
        pBitmapInfo->nBits = bitNum + 1;   
    }
    elementIdx = bitNum >> CL_BM_BITS_IN_BYTE_SHIFT;
    bitIdx = bitNum & CL_BM_BITS_IN_BYTE_MASK;
    (pBitmapInfo->pBitmap)[elementIdx] |= (0x1 << bitIdx);
    ++(pBitmapInfo->nBitsSet);

    clOsalMutexUnlock(pBitmapInfo->bitmapLock);   
    CL_DEBUG_PRINT(CL_DEBUG_TRACE, ("Exit"));
    return rc;
}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:46,代码来源:clBitmap.c

示例15: clMemPartFree

void clMemPartFree(ClMemPartHandleT handle, ClPtrT mem)
{
    STATUS rc = 0;
    ClMemPartT *pMemPart = NULL;
    if( !(pMemPart = (ClMemPartT*)handle) )
        return;
    if(!mem) return;
    clOsalMutexLock(&pMemPart->mutex);
    if( (rc = memPartFree(pMemPart->partId, mem) ) == ERROR )
    {
        /*
         * Ignore
         */
        clOsalMutexUnlock(&pMemPart->mutex);
        return;
    }
    clOsalMutexUnlock(&pMemPart->mutex);
}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:18,代码来源:clMemPart.c


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