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


C++ Assert_isTrue函数代码示例

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


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

示例1: Timer_getStatus

/*
 *  ======== Timer_getStatus ========
 */
Timer_Status Timer_getStatus(UInt timerId)
{
    Assert_isTrue(timerId < Timer_NUM_TIMER_DEVICES, NULL);

    if (Timer_module->availMask & (0x1 << timerId)) {
        return (Timer_Status_FREE);
    }
    else {
        return (Timer_Status_INUSE);
    }
}
开发者ID:alexeicolin,项目名称:sysbios,代码行数:14,代码来源:Timer.c

示例2: InterruptDsp_intDisable

/*!
 *  ======== InterruptDsp_intDisable ========
 *  Disables remote processor interrupt
 */     
Void InterruptDsp_intDisable(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo)
{
    UInt16 index;

    Assert_isTrue(((remoteProcId < MultiProc_getNumProcsInCluster()) &&
            (remoteProcId != MultiProc_self())), ti_sdo_ipc_Ipc_A_internal);

    index = MBX_TABLE_IDX(remoteProcId, MultiProc_self());

    REG32(MAILBOX_IRQENABLE_CLR_DSP(index)) = MAILBOX_REG_VAL(SUBMBX_IDX(index));
}
开发者ID:mobiaqua,项目名称:ti-ipc1,代码行数:15,代码来源:InterruptDsp.c

示例3: InterruptDsp_intRegister

/*!
 *  ======== InterruptDsp_intRegister ======== 
 */
Void InterruptDsp_intRegister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo,
                              Fxn func, UArg arg)
{
    UInt        key;
    UInt        eventId;
    UInt        combinedEventId;
    Int         index; 
    Hwi_Params  params;
    InterruptDsp_FxnTable *table; 

    Assert_isTrue(((remoteProcId < MultiProc_getNumProcsInCluster()) && 
                   (remoteProcId != MultiProc_self())), ti_sdo_ipc_Ipc_A_internal);

    index = PROCID(remoteProcId);
    
    /* Disable global interrupts */
    key = Hwi_disable();

    table = &(InterruptDsp_module->fxnTable[index]);
    table->func = func;
    table->arg  = arg;
    
    InterruptDsp_intClear(remoteProcId, intInfo);
    
    /* Make sure the interrupt only gets plugged once */
    eventId = InterruptDsp_dspInterruptTable[index];
    
    InterruptDsp_module->numPlugged++;
    
    if (InterruptDsp_module->numPlugged == 1) {
        EventCombiner_dispatchPlug(eventId,
            (Hwi_FuncPtr)InterruptDsp_intShmStub, eventId, TRUE);
        Hwi_Params_init(&params);
  
        combinedEventId = eventId / EVENT_GROUP_SIZE;  
            
        params.eventId = combinedEventId;
        params.arg = combinedEventId;
        params.enableInt = TRUE;
        Hwi_create(intInfo->intVectorId, &ti_sysbios_family_c64p_EventCombiner_dispatch,
                   &params, NULL);
        Hwi_enableInterrupt(intInfo->intVectorId);
    }
    else {
        EventCombiner_dispatchPlug(eventId,
                (Hwi_FuncPtr)InterruptDsp_intShmStub, eventId, TRUE);
    }

    /* Enable the mailbox interrupt to the DSP */
    InterruptDsp_intEnable(remoteProcId, intInfo);
    
    /* Restore global interrupts */
    Hwi_restore(key);
}
开发者ID:mobiaqua,项目名称:ti-ipc1,代码行数:57,代码来源:InterruptDsp.c

示例4: Event_post

/*
 *  ======== Event_post ========
 */
Void Event_post(Event_Object *event, UInt eventId)
{
    UInt tskKey, hwiKey;
    Event_PendElem *elem;
    Queue_Handle pendQ;

    Assert_isTrue((eventId != 0), Event_A_nullEventId);

    Log_write3(Event_LM_post, (UArg)event, (UArg)event->postedEvents, (UArg)eventId);

    pendQ = Event_Instance_State_pendQ(event);

    /* atomically post this event */
    hwiKey = Hwi_disable();

    /* or in this eventId */
    event->postedEvents |= eventId;

    /* confirm that ANY tasks are pending on this event */
    if (Queue_empty(pendQ)) {
        Hwi_restore(hwiKey);
        return;
    }

    tskKey = Task_disable();

    /* examine pendElem on pendQ */
    elem = (Event_PendElem *)Queue_head(pendQ);

    /* check for match, consume matching eventIds if so. */
    elem->matchingEvents = Event_checkEvents(event, elem->andMask, elem->orMask);

    if (elem->matchingEvents != 0) {

        /* remove event elem from elem queue */
        Queue_remove((Queue_Elem *)elem);

        /* mark the Event as having been posted */
        elem->pendState = Event_PendState_POSTED;

        /* disable Clock object */
        if (BIOS_clockEnabled && (elem->tpElem.clock != NULL)) {
            Clock_stop(elem->tpElem.clock);
        }

        /* put task back into readyQ */
        Task_unblockI(elem->tpElem.task, hwiKey);
    }

    Hwi_restore(hwiKey);

    /* context switch may occur here */
    Task_restore(tskKey);
}
开发者ID:DemonTu,项目名称:ALL_SmartBatterySwitch_CC2640,代码行数:57,代码来源:Event.c

示例5: dvsdk_grapx_display_rpc_display_toggle

Int dvsdk_grapx_display_rpc_display_toggle (Int instID)
{
  Int status;
    
  Assert_isTrue((MultiProc_self() != MultiProc_getId("VPSS-M3")), Assert_E_assertFailed);
  status = dvsdk_grapx_display_rpc_remote_mode_init();
  if (status >= 0) {
    status = dvsdk_grapx_display_exec_rpc(instID, g_RemoteStubContext.nDisplayToggelFxnIdx);
  }
  return status;  
}
开发者ID:skitlab,项目名称:ti-omtb,代码行数:11,代码来源:omtbGrpxDisplayRpcIf.c

示例6: SemaphoreMP_registerEvent

/*
 *  ======== SemaphoreMP_registerEvent ========
 */
Int SemaphoreMP_registerEvent(UArg arg, UInt16 remoteProcId) 
{
    Int status;
    
    status = Notify_registerEvent(remoteProcId, 0, SemaphoreMP_notifyEventId, 
            SemaphoreMP_cbFxn, NULL);
            
    Assert_isTrue(status >= 0, ti_sdo_ipc_Ipc_A_internal);
    
    return (0);
}
开发者ID:amartya00,项目名称:openmp_temp,代码行数:14,代码来源:SemaphoreMP.c

示例7: Timer_getStatus

/*
 *  ======== Timer_getStatus ========
 *  Get the FREE/INUSE status of the timer.
 */
Timer_Status Timer_getStatus(UInt timerId)
{
    Assert_isTrue(timerId < Timer_numTimerDevices, NULL);

    if (Timer_module->availMask & (0x1 << timerId)) {
        return (Timer_Status_FREE);
    }
    else {
        return (Timer_Status_INUSE);
    }
}
开发者ID:andreimironenko,项目名称:bios,代码行数:15,代码来源:Timer.c

示例8: Algorithm_exit

/*
 *  ======== Algorithm_exit ========
 */
Void Algorithm_exit()
{
    Assert_isTrue(curInit > 0, (Assert_Id)NULL);

    if (--curInit == 0) {
        ALG_exit();

        DMAN3_CE_exit();
        RMAN_exit();
    }
}
开发者ID:andreimironenko,项目名称:codec-engine,代码行数:14,代码来源:Algorithm_noOS.c

示例9: Timer_getHandle

/*
 *  ======== Timer_getHandle ========
 */
Timer_Handle Timer_getHandle(UInt id)
{
    Assert_isTrue((id < Timer_NUM_TIMER_DEVICES), NULL);

    if (id >= Timer_NUM_TIMER_DEVICES) {
        return (NULL);
    }
    else {
        return (Timer_module->handles[id]);
    }
}
开发者ID:alexeicolin,项目名称:sysbios,代码行数:14,代码来源:Timer.c

示例10: Hwi_reconfig

/*
 *  ======== Hwi_reconfig ========
 *  Reconfigure a dispatched interrupt.
 */
Void Hwi_reconfig(Hwi_Object *hwi, Hwi_FuncPtr fxn, const Hwi_Params *params)
{
    UInt intNum;
    Int priority;

    for (intNum = 0; intNum < Hwi_NUM_INTERRUPTS; intNum++) {
        if (Hwi_module->dispatchTable[intNum] == hwi) {
            break;
        }
    }

    Hwi_disableInterrupt(intNum);

    hwi->fxn = fxn;
    hwi->arg = params->arg;

    priority = params->priority;

    /* 
     * the -1 sentinel priority is the default passed by hal Hwi_create().
     * Translate it to 31, which is our default priority.
     */

    if (priority == -1) {
        priority = 31;
    }

    Hwi_module->priorities[intNum] = priority;

    Hwi_setPriority(intNum, priority);

    Assert_isTrue((params->maskSetting != Hwi_MaskingOption_BITMASK),
                  Hwi_A_unsupportedMaskingOption);
                  
    switch (params->maskSetting) {
        case Hwi_MaskingOption_NONE:
            hwi->handler = Hwi_handlerNONE;
            break;
        case Hwi_MaskingOption_ALL:
            hwi->handler = Hwi_handlerALL;
            break;
        case Hwi_MaskingOption_LOWER:
            hwi->handler = Hwi_handlerLOWER;
            break;
        case Hwi_MaskingOption_BITMASK:
        case Hwi_MaskingOption_SELF:
            hwi->handler = Hwi_handlerSELF;
            break;
    }

    if (params->enableInt) {
        Hwi_enableInterrupt(intNum);
    }
}
开发者ID:andreimironenko,项目名称:bios,代码行数:58,代码来源:Hwi.c

示例11: DriverAdapter_reclaim

/*
 *  ======== DriverAdapter_reclaim ========
 */
Void DriverAdapter_reclaim(DriverAdapter_Object *obj, 
    DriverTypes_Packet **packet, Error_Block *eb)
{
    List_Handle fromDriver;

    fromDriver = DriverAdapter_Instance_State_fromDriver(obj);

    /* Should never ever get this assert */
    Assert_isTrue(!List_empty(fromDriver), DriverAdapter_A_noReadyPacket);

    *packet = (DriverTypes_Packet *)List_get(fromDriver);
}
开发者ID:skitlab,项目名称:ti-ipc,代码行数:15,代码来源:DriverAdapter.c

示例12: IpcMgr_callIpcStart

/*
 *  ======== IpcMgr_callIpcStart ========
 *  Initialize standard IPC module, which may use the RPMSG protocol as well.
 *
 *  Calls the Ipc_start command.  This must be done after IpcMgr_ipcStartup().
 *
 *  Use for stacks using a combination of TransportRpmsg and other Transports.
 */
Void IpcMgr_callIpcStart()
{
    Int status;

    /*
     *  Ipc_start() calls Ipc_attach() to synchronize all remote processors
     *  if 'Ipc.procSync' is set to 'Ipc.ProcSync_ALL' in *.cfg
     *  HOST is skipped, thanks to overriding NotifySetup_numIntLines().
     */
    status = Ipc_start();
    Assert_isTrue(status >= 0, NULL);
}
开发者ID:liyaoshi,项目名称:ipcdev,代码行数:20,代码来源:IpcMgr.c

示例13: Clock_Instance_finalize

/*
 *  ======== Clock_Instance_finalize ========
 */
Void Clock_Instance_finalize(Clock_Object *obj)
{
    UInt key;

    Assert_isTrue(((BIOS_getThreadType() != BIOS_ThreadType_Hwi) &&
                   (BIOS_getThreadType() != BIOS_ThreadType_Swi)),
                        Clock_A_badThreadType);

    key = Hwi_disable();
    Queue_remove(&obj->elem);
    Hwi_restore(key);
}
开发者ID:DemonTu,项目名称:ALL_SmartBatterySwitch_CC2640,代码行数:15,代码来源:Clock.c

示例14: Notify_attach

/*
 *  ======== Notify_attach ========
 *  Called within Ipc module or directly by the user
 */
Int Notify_attach(UInt16 remoteProcId, Ptr sharedAddr)
{
    Int status;

    Assert_isTrue(remoteProcId < ti_sdo_utils_MultiProc_numProcessors,
                  ti_sdo_ipc_Notify_A_invArgument);

    /* Use the NotifySetup proxy to setup drivers */
    status = ti_sdo_ipc_Notify_SetupProxy_attach(remoteProcId, sharedAddr);

    return (status);
}
开发者ID:zaporozhets,项目名称:ti_ezsdk_tools,代码行数:16,代码来源:Notify.c

示例15: _ECPY_initEDMA3CHANStaticProperties

static void _ECPY_initEDMA3CHANStaticProperties(IRES_EDMA3CHAN2_Handle handle)
{
    /* ensure that the toolchain uses same structure layout for PaRAM overlay */
    Assert_isTrue((sizeof(IRES_EDMA3CHAN_PaRamStruct)==32), (Assert_Id)NULL);
    
    if (_EDMA3_globalRegs == NULL) {

        handle->ires.getStaticProperties((struct IRES_Obj *)handle,  
                (IRES_Properties *)&_EDMA3CHAN_staticProperties);
        _EDMA3_globalRegs = _EDMA3CHAN_staticProperties.globalRegs;
    }
}
开发者ID:andreimironenko,项目名称:framework_components,代码行数:12,代码来源:ecpy_impl.c


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