本文整理匯總了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);
}
}
示例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));
}
示例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(¶ms);
combinedEventId = eventId / EVENT_GROUP_SIZE;
params.eventId = combinedEventId;
params.arg = combinedEventId;
params.enableInt = TRUE;
Hwi_create(intInfo->intVectorId, &ti_sysbios_family_c64p_EventCombiner_dispatch,
¶ms, 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);
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
}
示例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();
}
}
示例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]);
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
}