• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Assert_isTrue函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Notify_intLineRegistered

/*
 *  ======== Notify_intLineRegistered ========
 */
Bool Notify_intLineRegistered(UInt16 procId, UInt16 lineId)
{
    Bool registered;
    UInt16 clusterId = ti_sdo_utils_MultiProc_getClusterId(procId);

    Assert_isTrue(procId < ti_sdo_utils_MultiProc_numProcessors && lineId <
                  ti_sdo_ipc_Notify_numLines, ti_sdo_ipc_Notify_A_invArgument);

    registered = (Notify_module->notifyHandles[clusterId][lineId] != NULL);

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


示例17: Pmu_getOverflowStatus

/*
 *  ======== Pmu_getOverflowStatus ========
 */
Bool Pmu_getOverflowStatus(UInt counterId)
{
    Assert_isTrue((counterId < Pmu_module->numCounters),
            Pmu_A_invalidCounterId);

    if (Pmu_getOverflowStatusI(counterId)) {
        return (TRUE);
    }
    else {
        return (FALSE);
    }
}
开发者ID:mobiaqua,项目名称:ti-sysbios-c64t,代码行数:15,代码来源:Pmu.c


示例18: processWait

/*
 *  ======== processWait ========
 */
static XDAS_Int32 processWait(IVIDDEC2BACK_Handle h, XDM_Context *context,
        IVIDDEC2_OutArgs *outArgs, UInt timeout)
{
    XDAS_Int32 retVal;
    _VIDDEC2BACK_Msg *msg;
    VISA_Handle visa = (VISA_Handle)h;

    Assert_isTrue(!VISA_isLocal(visa), (Assert_Id)NULL);

    /* wait for completion of "last" message */
    retVal = VISA_wait(visa, (VISA_Msg *)&msg, timeout);

    Assert_isTrue(msg->visa.cmd == _VIDDEC2BACK_CPROCESS, (Assert_Id)NULL);

    /*
     * Regardless of return value, unmarshall outArgs.
     */
    retVal = unmarshallMsg(h, context, outArgs, msg, retVal);

    return (retVal);
}
开发者ID:andreimironenko,项目名称:codec-engine,代码行数:24,代码来源:viddec2back_stubs.c


示例19: VIDENCCOPY_TI_alloc

/*
 *  ======== VIDENCCOPY_TI_alloc ========
 */
Int VIDENCCOPY_TI_alloc(const IALG_Params *algParams,
    IALG_Fxns **pf, IALG_MemRec memTab[])
{
    Registry_Result   result;


    /*
     *  No need to reference count for Registry_addModule(), since there
     *  is no way to remove the module.
     */
    if (regInit == 0) {
        /* Register this module for logging */
        result = Registry_addModule(&ti_sdo_ce_examples_codecs_videnc_copy_desc,
                MODNAME);
        Assert_isTrue(result == Registry_SUCCESS, (Assert_Id)NULL);

        if (result == Registry_SUCCESS) {
            /* Set the diags mask to the CE default */
            CESettings_init();
            CESettings_setDiags(MODNAME);
        }
        regInit = 1;
    }

    Log_print3(Diags_ENTRY, "[+E] VIDENCCOPY_TI_alloc(0x%x, 0x%x, 0x%x)",
            (IArg)algParams, (IArg)pf, (IArg)memTab);

    /* Request memory for my object */
    memTab[0].size = sizeof(VIDENCCOPY_TI_Obj);
    memTab[0].alignment = 0;
    memTab[0].space = IALG_EXTERNAL;
    memTab[0].attrs = IALG_PERSIST;

	// ADD BY ZHENGHANG
   	memTab[1].size = sizeof(char)*25000 * 1024;
    memTab[1].alignment = 0;
    memTab[1].space = IALG_EXTERNAL;//IALG_DARAM0;
    memTab[1].attrs = IALG_PERSIST;

	// ADD BY ZHOULU	
	memTab[2].size = sizeof(char) * 150000 * 1024;
	memTab[2].alignment = 0;
	memTab[2].space = IALG_EXTERNAL;
	memTab[2].attrs = IALG_PERSIST;

	memTab[3].size = sizeof(char) * 127*1024;
	memTab[3].alignment = 0;
	memTab[3].space = IALG_DARAM0;
	memTab[3].attrs = IALG_PERSIST;

//IALG_DARAM0;
    return (4);
}
开发者ID:zhoul14,项目名称:dsp_code,代码行数:56,代码来源:videnc_copy.c


示例20: Task_sleep

/*
 *  ======== Task_sleep ========
 */
Void Task_sleep(UInt timeout)
{
    Task_PendElem elem;
    UInt hwiKey, tskKey;
    Clock_Struct clockStruct;

    if (timeout == BIOS_NO_WAIT) {
        return;
    }

    Assert_isTrue((timeout != BIOS_WAIT_FOREVER), Task_A_badTimeout);

    /* add Clock event if timeout is not FOREVER */
    if (BIOS_clockEnabled) {
        Clock_Params clockParams;
        Clock_Params_init(&clockParams);
        clockParams.arg = (UArg)&elem;
        clockParams.startFlag = FALSE;  /* will start when necessary, thankyou */
        Clock_construct(&clockStruct, (Clock_FuncPtr)Task_sleepTimeout, timeout, &clockParams);
        elem.clock = Clock_handle(&clockStruct);
    }

    hwiKey = Hwi_disable();

    /* lock scheduler */
    tskKey = Task_disable();

    /* get task handle and block tsk */
    elem.task = Task_self();

    Task_blockI(elem.task);

    if (BIOS_clockEnabled) {
        Clock_startI(elem.clock);
    }

    /* Only needed for Task_delete() */
    Queue_elemClear(&elem.qElem);

    elem.task->pendElem = (Ptr)(&elem);

    Hwi_restore(hwiKey);

    Log_write3(Task_LM_sleep, (UArg)elem.task, (UArg)elem.task->fxn, 
               (UArg)timeout);

    Task_restore(tskKey);       /* the calling task will block here */

    /* deconstruct Clock if appropriate */
    if (BIOS_clockEnabled) {
        Clock_destruct(Clock_struct(elem.clock));
    }
}
开发者ID:andreimironenko,项目名称:bios,代码行数:56,代码来源:Task.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Assert_true函数代码示例发布时间:2022-05-30
下一篇:
C++ Assert_Param函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap