本文整理汇总了C++中GT_assert函数的典型用法代码示例。如果您正苦于以下问题:C++ GT_assert函数的具体用法?C++ GT_assert怎么用?C++ GT_assert使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GT_assert函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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)));
}
开发者ID:zaporozhets,项目名称:ti_ezsdk_tools,代码行数:10,代码来源:FrameQ_devctl.c
示例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");
}
开发者ID:andreimironenko,项目名称:framework-components-dm365,代码行数:47,代码来源:acpy3_arm.c
示例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);
}
开发者ID:black1tulip,项目名称:DVSDK,代码行数:58,代码来源:viddec_stubs.c
示例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");
}
开发者ID:andreimironenko,项目名称:framework-components-dm365,代码行数:46,代码来源:acpy3_wait_cpucopy.c
示例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) ;
}
开发者ID:zaporozhets,项目名称:ti_ezsdk_tools,代码行数:49,代码来源:FrameQ_common.c
示例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;
}
开发者ID:andreimironenko,项目名称:syslink,代码行数:28,代码来源:Omap3530IpcInt.c
示例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)));
}
开发者ID:zaporozhets,项目名称:ti_ezsdk_tools,代码行数:11,代码来源:FrameQ_devctl.c
示例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)));
}
开发者ID:andreimironenko,项目名称:syslink,代码行数:23,代码来源:messageq_devctl.c
示例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)));
}
开发者ID:zaporozhets,项目名称:ti_ezsdk_tools,代码行数:23,代码来源:Sharedregion_devctl.c
示例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");
}
开发者ID:andreimironenko,项目名称:framework-components-dm365,代码行数:44,代码来源:acpy3_fastconfigure32b.c
示例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) ;
}
开发者ID:zaporozhets,项目名称:ti_ezsdk_tools,代码行数:48,代码来源:FrameQ_common.c
示例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)));
}
开发者ID:zaporozhets,项目名称:ti_ezsdk_tools,代码行数:24,代码来源:Sharedregion_devctl.c
示例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);
}
开发者ID:zaporozhets,项目名称:ti_ezsdk_tools,代码行数:52,代码来源:Sharedregion_devctl.c
示例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 */
}
开发者ID:andreimironenko,项目名称:framework-components-dm365,代码行数:41,代码来源:ires_memtcm.c
示例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)));
}
开发者ID:zaporozhets,项目名称:ti_ezsdk_tools,代码行数:13,代码来源:FrameQ_devctl.c
示例16: processWait
/*
* ======== processWait ========
*/
static XDAS_Int32 processWait(IVIDENC1_Handle h, IVIDEO1_BufDescIn *inBufs,
XDM_BufDesc *outBufs, IVIDENC1_InArgs *inArgs, IVIDENC1_OutArgs *outArgs,
UInt timeout)
{
XDAS_Int32 retVal;
_VIDENC1_Msg *msg;
VISA_Handle visa = (VISA_Handle)h;
GT_assert(CURTRACE, !VISA_isLocal(visa));
/* wait for completion of "last" message */
retVal = VISA_wait(visa, (VISA_Msg *)&msg, timeout);
if (msg != NULL) {
GT_assert(CURTRACE, msg->visa.cmd == _VIDENC1_CPROCESS);
retVal = unmarshallMsg(h, inBufs, outBufs, inArgs, outArgs, msg,
retVal);
}
return retVal;
}
开发者ID:sv99,项目名称:DVSDK,代码行数:25,代码来源:videnc1_stubs.c
示例17: syslink_heapbufmp_destroy
/**
* Handler for heap buf mp 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_heapbufmp_destroy(resmgr_context_t *ctp, io_devctl_t *msg, syslink_ocb_t *ocb)
{
HeapBufMPDrv_CmdArgs * out = (HeapBufMPDrv_CmdArgs *) (_DEVCTL_DATA (msg->o));
out->apiStatus = HeapBufMP_destroy ();
GT_assert (curTrace, (out->apiStatus >= 0));
if (out->apiStatus >= 0) {
/* Remove this call from the list to be cleaned-up */
remove_ocb_res(ocb, DCMD_HEAPBUFMP_DESTROY, (int)NULL, NULL);
}
return (_RESMGR_PTR (ctp, &msg->o, sizeof (msg->o) + sizeof(HeapBufMPDrv_CmdArgs)));
}
开发者ID:andreimironenko,项目名称:syslink,代码行数:25,代码来源:Heapbufmp_devctl.c
示例18: IRES_SDMA_getMemRecs
/* ARGSUSED - this line tells the compiler not to warn about unused args. */
IRES_Status IRES_SDMA_getMemRecs(IRES_Handle handle,
IRES_ProtocolArgs * resProtocolArgs, IALG_MemRec *memRecs)
{
GT_3trace(ti_sdo_fc_ires_sdma_GTMask, GT_ENTER,
"_IRES_SDMA_getMemRecs> Enter (handle=0x%x, "
"resProtocolArgs=0x%x, memRecs=0x%x)\n", handle, resProtocolArgs,
memRecs);
GT_assert(ti_sdo_fc_ires_sdma_GTMask, memRecs != NULL);
GT_assert(ti_sdo_fc_ires_sdma_GTMask, resProtocolArgs != NULL);
memRecs[0].alignment = 4;
/*
* 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;
/*
* Size of this handle depends on number of Logical Channels requested
*/
memRecs[0].size = (sizeof(IRES_SDMA_Obj) + sizeof(SDMA_ChannelDescriptor));
GT_2trace(ti_sdo_fc_ires_sdma_GTMask, GT_4CLASS,
"_IRES_SDMA_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_sdma_GTMask, GT_ENTER,
"_IRES_SDMA_getMemRecs> Exit (status=IRES_OK)\n" );
return (IRES_OK); /* number of MemRecs */
}
开发者ID:andreimironenko,项目名称:framework-components-dm365,代码行数:40,代码来源:ires_sdma.c
示例19: OsalKfile_close
/*
* ======== OsalKfile_close ========
*/
Int
OsalKfile_close (OsalKfile_Handle * fileHandle)
{
Int status = OSALKFILE_SUCCESS;
OsalKfile_Object * fileObject = NULL;
mm_segment_t fs;
GT_1trace (curTrace, GT_ENTER, "OsalKfile_close", fileHandle);
GT_assert (curTrace, (fileHandle != NULL));
#if !defined(SYSLINK_BUILD_OPTIMIZE)
if (fileHandle == NULL) {
/*! @retval OSALKFILE_E_INVALIDARG NULL provided for argument
fileHandle. */
status = OSALKFILE_E_INVALIDARG;
GT_setFailureReason (curTrace,
GT_4CLASS,
"OsalKfile_close",
status,
"NULL provided for argument fileHandle");
}
else if (*fileHandle == NULL) {
/*! @retval OSALKFILE_E_HANDLE NULL file handle provided. */
status = OSALKFILE_E_HANDLE;
GT_setFailureReason (curTrace,
GT_4CLASS,
"OsalKfile_close",
status,
"NULL file handle provided.");
}
else {
#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) */
fileObject = (OsalKfile_Object *) *fileHandle;
fs = get_fs();
set_fs (KERNEL_DS);
filp_close (fileObject->fileDesc, NULL);
set_fs (fs);
Memory_free (NULL, fileObject, sizeof(OsalKfile_Object));
/* Reset user's file handle pointer. */
*fileHandle = NULL;
#if !defined(SYSLINK_BUILD_OPTIMIZE)
}
#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) */
GT_1trace (curTrace, GT_LEAVE, "OsalKfile_close", status);
/*! @retval OSALKFILE_SUCCESS Operation successfully completed. */
return status;
}
开发者ID:andreimironenko,项目名称:syslink,代码行数:54,代码来源:OsalKfile.c
示例20: OsalSemaphore_delete
/*!
* @brief Deletes an instance of Semaphore object.
*
* @param mutexHandle Semaphore object handle which needs to be deleted.
*
* @sa OsalSemaphore_create
*/
Int
OsalSemaphore_delete(OsalSemaphore_Handle *semHandle)
{
Int status = OSALSEMAPHORE_SUCCESS;
OsalSemaphore_Object **semObj = (OsalSemaphore_Object **)semHandle;
int osStatus = 0;
GT_1trace (curTrace, GT_ENTER, "OsalSemaphore_delete", semHandle);
GT_assert (curTrace, (semHandle != NULL));
#if !defined(SYSLINK_BUILD_OPTIMIZE)
if (semHandle == NULL) {
status = OSALSEMAPHORE_E_INVALIDARG;
GT_setFailureReason (curTrace,
GT_4CLASS,
"OsalSemaphore_delete",
status,
"NULL provided for argument semHandle");
}
else if (*semHandle == NULL) {
status = OSALSEMAPHORE_E_HANDLE;
GT_setFailureReason (curTrace,
GT_4CLASS,
"OsalSemaphore_delete",
status,
"NULL Semaphore handle provided.");
}
else {
#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) */
osStatus = sem_destroy(&((*semObj)->lock));
#if !defined(SYSLINK_BUILD_OPTIMIZE)
if (osStatus < 0) {
status = OSALSEMAPHORE_E_HANDLE;
GT_setFailureReason (curTrace,
GT_4CLASS,
"OsalSemaphore_delete",
status,
"Failed to destroy semaphore");
}
#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) */
Memory_free(NULL, *semHandle, sizeof (OsalSemaphore_Object));
*semHandle = NULL;
#if !defined(SYSLINK_BUILD_OPTIMIZE)
}
#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) */
GT_1trace (curTrace, GT_LEAVE, "OsalSemaphore_delete", status);
return status;
}
开发者ID:ZIViTi,项目名称:android_hardware_ti_omap4,代码行数:58,代码来源:OsalSemaphore.c
注:本文中的GT_assert函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论