本文整理汇总了C++中GT_assert函数的典型用法代码示例。如果您正苦于以下问题:C++ GT_assert函数的具体用法?C++ GT_assert怎么用?C++ GT_assert使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GT_assert函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: syslink_frameq_close
int syslink_frameq_close(resmgr_context_t *ctp, io_devctl_t *msg, syslink_ocb_t *ocb){
FrameQDrv_CmdArgs *cargs = (FrameQDrv_CmdArgs *) (_DEVCTL_DATA (msg->i));
FrameQDrv_CmdArgs *out = (FrameQDrv_CmdArgs *) (_DEVCTL_DATA (msg->o));
out->apiStatus = FrameQ_close ((FrameQ_Handle *)&(cargs->args.close.handle));
GT_assert (curTrace, (out->apiStatus >= 0));
return (_RESMGR_PTR (ctp, &msg->o, sizeof (msg->o) + sizeof(FrameQDrv_CmdArgs)));
}
示例2: _ACPY3_init
/*
* ======== _ACPY3_init ========
* Initialize the ACPY3 module
*/
static void _ACPY3_init(Void)
{
GT_0trace(CURTRACE, GT_ENTER, "_ACPY3_init > Enter\n");
if (refCount == 0) {
#ifndef _ACPY3_CPUCOPY_
_ACPY3_qdmaInit();
#endif
initQdmaSettings();
#ifndef _ACPY3_CPUCOPY_
_ACPY3_lock = LockMP_create(_ACPY3_SEMKEY);
GT_assert(CURTRACE, _ACPY3_lock != NULL);
#endif
}
/* count references even if no allocation is done */
/* so that memory free is done only when last node requires ACPY3 */
refCount++;
GT_assert(CURTRACE, verifyOffset(ACPY3_PARAMFIELD_ELEMENTSIZE,
ACPY3_PaRamRegs, acnt));
GT_assert(CURTRACE, verifyOffset(ACPY3_PARAMFIELD_NUMELEMENTS,
ACPY3_PaRamRegs, bcnt));
GT_assert(CURTRACE, verifyOffset(ACPY3_PARAMFIELD_ELEMENTINDEX_SRC,
ACPY3_PaRamRegs, srcElementIndex));
GT_assert(CURTRACE, verifyOffset(ACPY3_PARAMFIELD_ELEMENTINDEX_DST,
ACPY3_PaRamRegs, dstElementIndex));
GT_assert(CURTRACE, verifyOffset(ACPY3_PARAMFIELD_FRAMEINDEX_SRC,
ACPY3_PaRamRegs, srcFrameIndex));
GT_assert(CURTRACE, verifyOffset(ACPY3_PARAMFIELD_FRAMEINDEX_DST,
ACPY3_PaRamRegs, dstFrameIndex));
GT_assert(CURTRACE, verifyOffset(ACPY3_PARAMFIELD_NUMFRAMES,
ACPY3_PaRamRegs, ccnt));
GT_assert(CURTRACE, verifyOffset(ACPY3_PARAMFIELD_SRCADDR,
ACPY3_PaRamRegs, src));
GT_assert(CURTRACE, verifyOffset(ACPY3_PARAMFIELD_DSTADDR,
ACPY3_PaRamRegs, dst));
GT_0trace(CURTRACE, GT_ENTER, "_ACPY3_init > Exit\n");
}
示例3: unmarshallMsg
/*
* ======== unmarshallMsg ========
*/
static XDAS_Int32 unmarshallMsg(IVIDDEC_Handle h, XDM_BufDesc *inBufs,
XDM_BufDesc *outBufs, IVIDDEC_InArgs *inArgs, IVIDDEC_OutArgs *outArgs,
_VIDDEC_Msg *msg, XDAS_Int32 retVal)
{
VISA_Handle visa = (VISA_Handle)h;
IVIDDEC_OutArgs *pMsgOutArgs;
Int i;
/*
* Do a wholesale replace of skeleton returned structure.
* Pointer conversion of fields in outArgs is done below (only
* in the case of a successful return value).
*/
pMsgOutArgs = (IVIDDEC_OutArgs *)((UInt)(&(msg->cmd.process.inArgs)) +
inArgs->size);
if (VISA_isChecked()) {
/* ensure the codec didn't change outArgs->size */
GT_assert(CURTRACE, pMsgOutArgs->size == outArgs->size);
}
memcpy(outArgs, pMsgOutArgs, outArgs->size);
/* if VISA_call was successful, also unmarshall outBufs */
if (retVal == VIDDEC_EOK) {
/* unmarshall the output data: outBufs and outArgs. */
/* The outBufs may have changed
* - [dm]TODO:H find out if outBufs can change so we can save some
* cycles! and outArgs buffers may have been provided. All these
* values are "raw", as seen by the DSP, so those physical addresses
* must be converted to user addresses first.
*/
for (i = 0; i < msg->cmd.process.numOutBufs; i++) {
outBufs->bufSizes[i] = msg->cmd.process.outBufSizes[i];
outBufs->bufs[i] = Memory_getBufferVirtualAddress(
(UInt32)msg->cmd.process.outBufs[i],
msg->cmd.process.outBufSizes[i]);
}
/* pointers in outArgs.displayBufs are physical, so convert them */
for (i = 0; i < outArgs->displayBufs.numBufs; i++) {
outArgs->displayBufs.bufs[i] = Memory_getBufferVirtualAddress(
(UInt32)(outArgs->displayBufs.bufs[i]),
outArgs->displayBufs.bufSizes[i]);
}
}
/* Note that we did *nothing* with inBufs nor inArgs. This should be ok. */
VISA_freeMsg(visa, (VISA_Msg)msg);
return (retVal);
}
示例4: ACPY3_wait
/*
* ======== ACPY3_wait ========
* Wait for all submitted DMA transfer on this logical channel to complete.
*/
Void ACPY3_wait(IDMA3_Handle handle)
{
GT_1trace(CURTRACE, GT_ENTER, "ACPY3_wait> Enter "
"(handle=0x%x)\n",handle);
GT_assert(CURTRACE, handle != NULL);
ACPY3_INSTR_CALLHOOKFXN(((ACPY3_MoreEnv *)(handle->env))->hooks,handle,\
ACPY3_INSTR_WAIT_ENTER);
/*
* Wait for a channel only once. Set the 'pending' flag whenever new
* transfer is submitted, then clear it when ACPY3_wait* is issued.
*/
if (!handle->transferPending) {
ACPY3_INSTR_CALLHOOKFXN(((ACPY3_MoreEnv *)(handle->env))->hooks,handle,
ACPY3_INSTR_WAIT_EXIT);
GT_0trace(CURTRACE, GT_4CLASS, "_ACPY3_start> No transfer"
" pending\n");
GT_0trace(CURTRACE, GT_ENTER, "_ACPY3_start> Exit\n");
return; /* already waited since last start. */
}
doTransfer(handle);
/*
* Mark channel handle state to indicate pending transfer has completed
* and 'wait' done
*/
handle->transferPending = FALSE;
ACPY3_INSTR_CALLHOOKFXN(((ACPY3_MoreEnv *)(handle->env))->hooks,handle,\
ACPY3_INSTR_WAIT_EXIT);
GT_assert(CURTRACE, handle->transferPending == FALSE);
GT_0trace(CURTRACE, GT_ENTER, "ACPY3_wait> Exit\n");
}
示例5: FrameQ_getFrameBufDataStartOffset
/*
* @brief Function to get the valid data start offset in framebuffer
* identified by the frame buffer number in a given frame.
*
* @param buf frame.
* @param frameBufNum frame buffer number.
*/
UInt32
FrameQ_getFrameBufDataStartOffset(FrameQ_Frame frame,
UInt32 frameBufNum )
{
UInt32 offSet = -1;
FrameQ_FrameBufInfo *frameBufInfo;
GT_2trace (curTrace,
GT_ENTER,
"FrameQ_getFrameBufDataStartOffset",
frame,
frameBufNum);
GT_assert (curTrace, (NULL != frame));
GT_assert (curTrace, (frame->numFrameBuffers > frameBufNum)) ;
frameBufInfo = (FrameQ_FrameBufInfo *)&(frame->frameBufInfo[0]);
#if !defined(SYSLINK_BUILD_OPTIMIZE)
if (frame->numFrameBuffers < frameBufNum) {
/*! @retval 0xFFFFFFFF frameBufNum provided should be less
* from 0 to number of frame buffers -1
*/
GT_setFailureReason (curTrace,
GT_4CLASS,
"FrameQ_getFrameBufDataStartOffset",
FrameQ_E_INVALIDARG,
"frameBufNum provided should be less from 0 to "
"number of frame buffers -1 .!");
}
else {
#endif /*#if !defined(SYSLINK_BUILD_OPTIMIZE)*/
offSet = frameBufInfo[frameBufNum].startOffset;
#if !defined(SYSLINK_BUILD_OPTIMIZE)
}
#endif /*#if !defined(SYSLINK_BUILD_OPTIMIZE)*/
GT_1trace (curTrace, GT_LEAVE, "FrameQ_getFrameBufDataStartOffset", offSet);
/*! @retval size frame buffer data start offset in the frame buffer */
return (offSet) ;
}
示例6: Omap3530IpcInt_waitClearInterrupt
/*!
* @brief Function to wait for interrupt to be cleared.
*
* @param procId Remote processor ID
* @param intId interrupt id
*
* @sa Omap3530IpcInt_sendInterrupt
*/
Int32
Omap3530IpcInt_waitClearInterrupt (UInt16 procId, UInt32 intId)
{
Int32 status = OMAP3530IPCINT_SUCCESS;
GT_2trace (curTrace,GT_ENTER,"Omap3530IpcInt_waitClearInterrupt",
procId, intId);
GT_assert (curTrace, (ArchIpcInt_object.isSetup == TRUE));
GT_assert (curTrace, (procId < MultiProc_MAXPROCESSORS));
/* Wait for GPP to clear the previous interrupt */
while ((REG32((Omap3530IpcInt_state.mailboxBase + MAILBOX_MSGSTATUS_1_OFFSET)) & 7 ));
GT_1trace (curTrace,GT_LEAVE,"Omap3530IpcInt_waitClearInterrupt", status);
/*! @retval OMAP3530IPCINT_SUCCESS Wait for interrupt clearing successfully
completed. */
return status;
}
示例7: syslink_frameq_destroy
int syslink_frameq_destroy(resmgr_context_t *ctp, io_devctl_t *msg, syslink_ocb_t *ocb){
FrameQDrv_CmdArgs *out = (FrameQDrv_CmdArgs *) (_DEVCTL_DATA (msg->o));
out->apiStatus = FrameQ_destroy ();
GT_assert (curTrace, ( out->apiStatus >= 0));
return (_RESMGR_PTR (ctp, &msg->o, sizeof (msg->o) + sizeof(FrameQDrv_CmdArgs)));
}
示例8: syslink_messageq_destroy
/**
* Handler for messageq destroy API.
*
* \param ctp Thread's associated context information.
* \param msg The actual devctl() message.
* \param ocb OCB associated with client's session.
*
* \return POSIX errno value.
*
* \retval EOK Success.
* \retval ENOTSUP Unsupported devctl().
*/
int syslink_messageq_destroy(resmgr_context_t *ctp, io_devctl_t *msg, syslink_ocb_t *ocb) {
MessageQDrv_CmdArgs * out = (MessageQDrv_CmdArgs *) (_DEVCTL_DATA (msg->o));
out->apiStatus = MessageQ_destroy ();
GT_assert (curTrace, ( out->apiStatus >= 0));
if (out->apiStatus >= 0)
remove_ocb_res(ocb, DCMD_MESSAGEQ_DESTROY, NULL, NULL);
return (_RESMGR_PTR (ctp, &msg->o, sizeof (msg->o) + sizeof(MessageQDrv_CmdArgs)));
}
示例9: syslink_sharedregion_detach
/**
* Handler for shared region detach API.
*
* \param ctp Thread's associated context information.
* \param msg The actual devctl() message.
* \param ocb OCB associated with client's session.
*
* \return POSIX errno value.
*
* \retval EOK Success.
* \retval ENOTSUP Unsupported devctl().
*/
int syslink_sharedregion_detach(resmgr_context_t *ctp, io_devctl_t *msg, syslink_ocb_t *ocb) {
SharedRegionDrv_CmdArgs * cargs = (SharedRegionDrv_CmdArgs *) (_DEVCTL_DATA (msg->i));
SharedRegionDrv_CmdArgs * out = (SharedRegionDrv_CmdArgs *) (_DEVCTL_DATA (msg->o));
out->apiStatus = SharedRegion_detach (cargs->args.attach.remoteProcId);
GT_assert (curTrace, (out->apiStatus >= 0));
return (_RESMGR_PTR (ctp, &msg->o, sizeof (msg->o) + sizeof(SharedRegionDrv_CmdArgs)));
}
示例10: ACPY3_fastConfigure32b
/*
* ======== ACPY3_fastConfigure32b ========
*/
Void ACPY3_fastConfigure32b(IDMA3_Handle restrict handle,
ACPY3_ParamField32b fieldId, Uns value, short transferNo)
{
ACPY3_PaRamRegs * paRamCache;
#ifndef _ACPY3_CPUCOPY_
UInt32 physVal;
Int size;
#endif
GT_assert(CURTRACE, handle != NULL);
GT_assert(CURTRACE, handle->protocol == &ACPY3_PROTOCOL);
GT_assert(CURTRACE, transferNo >= 0);
GT_assert(CURTRACE,
transferNo < ((ACPY3_MoreEnv *)(handle->env))->numPaRams);
GT_assert(CURTRACE, !handle->transferPending);
GT_4trace(CURTRACE, GT_ENTER, "ACPY3_fastConfigure32b> "
"Enter (handle=0x%x, fieldId=0x%x, value=0x%x, transferNo=%d)\n",
handle, fieldId, value, transferNo);
paRamCache = (ACPY3_PaRamRegs *)ACPY3_getPaRamCache(handle, transferNo);
#ifndef _ACPY3_CPUCOPY_
/* Address fields must be converted to physical address */
size = 4; /* Otherwise we have to read the registers */
if ((fieldId == ACPY3_PARAMFIELD_SRCADDR) ||
(fieldId == ACPY3_PARAMFIELD_DSTADDR)) {
physVal = (UInt32)MEMUTILS_getPhysicalAddr((Ptr)value);
*((Uns *)((Uns)paRamCache + fieldId)) = physVal;
}
else {
/* Non-address field */
*((Uns *)((Uns)paRamCache + fieldId)) = value;
}
#else
*((Uns *)((Uns)paRamCache + fieldId)) = value;
#endif
GT_0trace(CURTRACE, GT_ENTER, "ACPY3_fastConfigure32b> Exit\n");
}
示例11: FrameQ_getFrameBufValidSize
/*
* @brief Function to get the valid data size of a framebuffer
* identified by the frame buffer number in a given frame.
*
* @param buf frame.
* @param frameBufNum frame buffer number.
*/
UInt32
FrameQ_getFrameBufValidSize(FrameQ_Frame frame, UInt32 frameBufNum )
{
UInt32 size = 0;
FrameQ_FrameBufInfo *frameBufInfo;
GT_2trace (curTrace,
GT_ENTER,
"FrameQ_getFrameBufValidSize",
frame,
frameBufNum);
GT_assert (curTrace, (NULL != frame));
GT_assert (curTrace, (frame->numFrameBuffers > frameBufNum)) ;
frameBufInfo = (FrameQ_FrameBufInfo *)&(frame->frameBufInfo[0]);
#if !defined(SYSLINK_BUILD_OPTIMIZE)
if (frame->numFrameBuffers < frameBufNum) {
/*! @retval 0 frameBufNum provided should be less
* from 0 to number of frame buffers -1
*/
GT_setFailureReason (curTrace,
GT_4CLASS,
"FrameQ_getFrameBufValidSize",
FrameQ_E_INVALIDARG,
"frameBufNum provided should be less from 0 to "
"number of frame buffers -1 .!");
}
else {
#endif /*#if !defined(SYSLINK_BUILD_OPTIMIZE)*/
size = frameBufInfo[frameBufNum].validSize;
#if !defined(SYSLINK_BUILD_OPTIMIZE)
}
#endif /*#if !defined(SYSLINK_BUILD_OPTIMIZE)*/
GT_1trace (curTrace, GT_LEAVE, "FrameQ_getFrameBufValidSize", size);
/*! @retval size frame buffer valid size */
return (size) ;
}
示例12: syslink_sharedregion_start
/**
* Handler for shared region start API.
*
* \param ctp Thread's associated context information.
* \param msg The actual devctl() message.
* \param ocb OCB associated with client's session.
*
* \return POSIX errno value.
*
* \retval EOK Success.
* \retval ENOTSUP Unsupported devctl().
*/
int syslink_sharedregion_start(resmgr_context_t *ctp, io_devctl_t *msg, syslink_ocb_t *ocb) {
SharedRegionDrv_CmdArgs * out = (SharedRegionDrv_CmdArgs *) (_DEVCTL_DATA (msg->o));
out->apiStatus = SharedRegion_start ();
GT_assert (curTrace, (out->apiStatus >= 0));
return (_RESMGR_PTR (ctp, &msg->o, sizeof (msg->o) + sizeof(SharedRegionDrv_CmdArgs)));
}
示例13: syslink_sharedregion_setup
/**
* Handler for shared region setup API.
*
* \param ctp Thread's associated context information.
* \param msg The actual devctl() message.
* \param ocb OCB associated with client's session.
*
* \return POSIX errno value.
*
* \retval EOK Success.
* \retval ENOTSUP Unsupported devctl().
*/
int syslink_sharedregion_setup(resmgr_context_t *ctp, io_devctl_t *msg, syslink_ocb_t *ocb) {
SharedRegionDrv_CmdArgs * cargs = (SharedRegionDrv_CmdArgs *) (_DEVCTL_DATA (msg->i));
SharedRegionDrv_CmdArgs * out = (SharedRegionDrv_CmdArgs *) (_DEVCTL_DATA (msg->o));
SharedRegion_Config *config = (SharedRegion_Config*)(cargs+1);
SharedRegion_Region *region = (SharedRegion_Region *)(config+1);
UInt16 i;
out->apiStatus = SharedRegion_setup (config);
GT_assert (curTrace, (out->apiStatus >= 0));
for (i = 0; i < config->numEntries; i++) {
SharedRegion_getRegionInfo (i, ®ion[i]);
if (region[i].entry.isValid == TRUE) {
/* Convert the kernel virtual address to physical
* addresses */
region[i].entry.base = MemoryOS_translate (
(Ptr)region[i].entry.base,
Memory_XltFlags_Virt2Phys);
GT_assert (curTrace, (region[i].entry.base != NULL));
}
}
if (out->apiStatus >= 0) {
/* Add this call to the list to be cleaned-up */
add_ocb_res(ocb, DCMD_SHAREDREGION_DESTROY, (int)NULL, NULL);
}
SETIOV(&ctp->iov[0], &msg->o, sizeof(msg->o) + sizeof(SharedRegionDrv_CmdArgs));
SETIOV(&ctp->iov[1], config, sizeof(SharedRegion_Config) );
SETIOV(&ctp->iov[2], region, config->numEntries*sizeof(SharedRegion_Region));
return _RESMGR_NPARTS(3);
}
示例14: IRES_MEMTCM_getMemRecs
/* ARGSUSED - this line tells the compiler not to warn about unused args. */
IRES_Status IRES_MEMTCM_getMemRecs(IRES_Handle handle,
IRES_ProtocolArgs * resProtocolArgs, IALG_MemRec *memRecs)
{
/*
IRES_MEMTCM_ProtocolArgs * protocolArgs =
(IRES_MEMTCM_ProtocolArgs *)resProtocolArgs;
*/
GT_3trace(ti_sdo_fc_ires_memtcm_GTMask, GT_ENTER,
"_IRES_MEMTCM_getMemRecs> Enter (handle=0x%x, "
"resProtocolArgs=0x%x, memRecs=0x%x)\n", handle, resProtocolArgs,
memRecs);
GT_assert(ti_sdo_fc_ires_memtcm_GTMask, memRecs != NULL);
GT_assert(ti_sdo_fc_ires_memtcm_GTMask, resProtocolArgs != NULL);
memRecs[0].alignment = 4;
memRecs[0].size = sizeof(IRES_MEMTCM_Obj);
/*
* IALG_EXTERNAL because we don't care where this memory is allocated
*/
memRecs[0].space = IALG_ESDATA;
/*
* Memory should be persistent.
*/
memRecs[0].attrs = IALG_PERSIST;
GT_2trace(ti_sdo_fc_ires_memtcm_GTMask, GT_4CLASS,
"_IRES_MEMTCM_getMemRecs> Requesting memory of size 0x%x, "
"alignment 0x%x, space IALG_ESDATA, attrs IALG_PERSIST)\n",
memRecs[0].size, memRecs[0].alignment);
GT_0trace(ti_sdo_fc_ires_memtcm_GTMask, GT_ENTER,
"_IRES_MEMTCM_getMemRecs> Exit (status=IRES_OK)\n" );
return (IRES_OK); /* number of MemRecs */
}
示例15: syslink_frameq_setup
int syslink_frameq_setup(resmgr_context_t *ctp, io_devctl_t *msg, syslink_ocb_t *ocb){
FrameQDrv_CmdArgs *cargs = (FrameQDrv_CmdArgs *) (_DEVCTL_DATA (msg->i));
FrameQDrv_CmdArgs *out = (FrameQDrv_CmdArgs *) (_DEVCTL_DATA (msg->o));
FrameQ_Config *config = (FrameQ_Config*)(cargs+1);
out->apiStatus = FrameQ_setup (config);
GT_assert (curTrace, (out->apiStatus >= 0));
return (_RESMGR_PTR (ctp, &msg->o, sizeof (msg->o) + sizeof(FrameQDrv_CmdArgs)));
}