本文整理汇总了C++中Log_print2函数的典型用法代码示例。如果您正苦于以下问题:C++ Log_print2函数的具体用法?C++ Log_print2怎么用?C++ Log_print2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Log_print2函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DSKT2_deactivateAll
/*
* ======== DSKT2_deactivateAll ========
*/
Int DSKT2_deactivateAll()
{
#ifndef DSKT2_DISABLELAZYD
IALG_Handle alg;
Int i;
#endif
Int nActive = 0;
Log_print0(Diags_ENTRY, "[+E] DSKT2_deactivateAll Enter");
#ifndef DSKT2_DISABLELAZYD
if (_DSKT2_lastActiveAlg == NULL) {
/*
* Memory not yet allocated for _DSKT2_lastActiveAlg ( _DSKT2_init not
* yet called), so return "0" active algorithms
*/
return (nActive);
}
/*
* Deactivate all algs that have been lazily deactivated.
*/
for (i = 0; i < DSKT2_NUM_SCRATCH_GROUPS; i++) {
if ((alg = _DSKT2_lastActiveAlg[i]) != NULL) {
if (alg->fxns->algDeactivate != NULL) {
Log_print2(Diags_USER4,
"[+4] DSKT2_deactivateAll> Real deactivate of algorithm "
"0x%x in scratch group %d", (IArg)alg, (IArg)i);
alg->fxns->algDeactivate(alg);
}
_DSKT2_lastActiveAlg[i] = NULL;
}
if (_DSKT2_activeAlg[i] != NULL) {
Log_print2(Diags_USER2, "[+2] DSKT2_deactivateAll>"
" Algorithm 0x%x in scratch group %d still active",
(IArg)alg, (IArg)i);
nActive++;
}
}
#endif
Log_print1(Diags_EXIT, "[+X] DSKT2_deactivateAll Exit (numActive=%d)",
(IArg)(nActive + _DSKT2_NumYielded));
return (nActive + _DSKT2_NumYielded);
}
示例2: RcmClient_removeSymbol
Int RcmClient_removeSymbol(RcmClient_Object *obj, String name)
{
// Int status = RcmClient_S_SUCCESS;
Int status = RcmClient_E_FAIL;
Log_print2(Diags_ENTRY, "--> %s: (obj=0x%x)", (IArg)FXNN, (IArg)obj);
/* TODO */
Log_print2(Diags_EXIT, "<-- %s: %d", (IArg)FXNN, (IArg)status);
return(status);
}
示例3: RcmClient_alloc
Int RcmClient_alloc(RcmClient_Object *obj, UInt32 dataSize,
RcmClient_Message **message)
{
SizeT totalSize;
RcmClient_Packet *packet;
Int status = RcmClient_S_SUCCESS;
Log_print3(Diags_ENTRY,
"--> RcmClient_alloc: obj: 0x%x, dataSize: %d, message: 0x%x",
(IArg)obj, (IArg)dataSize, (IArg)message);
/* ensure minimum size of UInt32[1] */
dataSize = (dataSize < sizeof(UInt32) ? sizeof(UInt32) : dataSize);
/* total memory size (in chars) needed for headers and payload */
totalSize = sizeof(RcmClient_Packet) - sizeof(UInt32) + dataSize;
/* allocate the message */
packet = (RcmClient_Packet*)MessageQ_alloc(obj->heapId, totalSize);
if (NULL == packet) {
Log_error1(FXNN": could not allocate message, size = %u",
(IArg)totalSize);
status = RcmClient_E_MSGALLOCFAILED;
goto leave;
}
/* Log_info() */
Log_print2(Diags_INFO,
FXNN": RcmMessage allocated: addr=0x%x, size=%u (total size)",
(IArg)packet, (IArg)totalSize);
/* initialize the packet structure */
packet->desc = 0;
packet->msgId = RcmClient_genMsgId_P(obj);
packet->message.poolId = RcmClient_DEFAULTPOOLID;
packet->message.jobId = RcmClient_DISCRETEJOBID;
packet->message.fxnIdx = RcmClient_INVALIDFXNIDX;
packet->message.result = 0;
packet->message.dataSize = dataSize;
/* set message pointer to start of the message struct */
*message = (RcmClient_Message *)(&(packet->message));
leave:
Log_print2(Diags_EXIT, "<-- %s: %d", (IArg)FXNN, (IArg)status);
return(status);
}
示例4: VIDDEC2FRONT_processAsync
/*
* ======== VIDDEC2_processAsync ========
*/
XDAS_Int32 VIDDEC2FRONT_processAsync(VIDDEC2_Handle handle,
VIDDEC2_InArgs *inArgs, XDM_Context *context,
VIDDEC2FRONT_OutArgs *outArgs)
{
XDAS_Int32 retVal = VIDDEC2_EFAIL;
/*
* Note, we do this because someday we may allow dynamically changing
* the global 'VISA_isChecked()' value on the fly. If we allow that,
* we need to ensure the value stays consistent in the context of this call.
*/
Bool checked = VISA_isChecked();
Log_print4(Diags_ENTRY, "[+E] VIDDEC2_processAsync> "
"Enter (handle=0x%x, inArgs=0x%x, context=0x%x, outArgs=0x%x)",
(IArg)handle, (IArg)inArgs, (IArg)context, (IArg)outArgs);
if (handle) {
IVIDDEC2FRONT_Handle alg = VISA_getAlgHandle((VISA_Handle)handle);
if (alg != NULL) {
if (checked) {
/* validate inArgs with ranges. */
if (inArgs->inputID == 0) {
Log_print2(Diags_USER7,
"[+7] ERROR> app provided codec (0x%x) with out of range "
"inArgs->inputID field (0x%x)",
(IArg)alg, (IArg)(inArgs->inputID));
}
#if 0
/*
* Validate inBufs and outBufs.
*/
XdmUtils_validateSparseBufDesc1(inBufs, "inBufs");
XdmUtils_validateSparseBufDesc(outBufs, "outBufs");
#endif
}
retVal = processAsync(alg, inArgs, context, outArgs);
}
}
Log_print2(Diags_EXIT, "[+X] VIDDEC2FRONT_processAsync> "
"Exit (handle=0x%x, retVal=0x%x)", (IArg)handle, (IArg)retVal);
return (retVal);
}
示例5: RcmClient_waitUntilDone
Int RcmClient_waitUntilDone(RcmClient_Object *obj,
UInt16 msgId, RcmClient_Message **returnMsg)
{
RcmClient_Message *rtnMsg;
Int rval;
Int status = RcmClient_S_SUCCESS;
Log_print4(Diags_ENTRY, "--> %s: (obj=0x%x, msgId=%d, msg=0x%x)",
(IArg)FXNN, (IArg)obj, (IArg)msgId, (IArg)returnMsg);
/* get the return message from the server */
rval = RcmClient_getReturnMsg_P(obj, msgId, &rtnMsg);
if (rval < 0) {
*returnMsg = NULL;
status = rval;
goto leave;
}
*returnMsg = rtnMsg;
leave:
Log_print2(Diags_EXIT, "<-- %s: %d", (IArg)FXNN, (IArg)status);
return(status);
}
示例6: ti_sdo_ce_osal_Memory_redefine
/*
* ======== Memory_redefine ========
*/
Bool ti_sdo_ce_osal_Memory_redefine(Int segId, Uint32 base, Uint32 size)
{
HeapMem_Params params;
HeapMem_Handle heap;
Memory_Stat stat;
if ((segId < 0) || (segId >= Memory_numHeaps)) {
Log_print2(Diags_USER7, "Memory_redefine> segId (%d) out of range. "
"Should be < %d", (IArg)segId,
(IArg)Memory_numHeaps);
return (FALSE);
}
if (!Memory_segStat(segId, &stat)) {
Log_print0(Diags_USER7, "Memory_redefine> Memory_segStat() failed!");
return (FALSE);
}
if (stat.used > 0) {
Log_print0(Diags_USER7, "Memory_redefine> Heap in use!");
return (FALSE);
}
heap = ti_sdo_ce_osal_Memory_heapList[segId];
HeapMem_destruct(HeapMem_struct(heap));
HeapMem_Params_init(¶ms);
params.size = size;
params.buf = (Ptr)base;
HeapMem_construct(HeapMem_struct(heap), ¶ms);
return (TRUE);
}
示例7: WatchdogCC26XX_setReload
/*
* ======== WatchdogCC26XX_setReload ========
*/
void WatchdogCC26XX_setReload(Watchdog_Handle handle, uint32_t value)
{
WatchdogCC26XX_Object *object;
/* get the pointer to the object and hwAttrs */
object = handle->object;
/* udpate the watchdog object with the new reload value */
object->reloadValue = value;
/* unlock the Watchdog configuration registers */
WatchdogUnlock();
/* make sure the Watchdog is unlocked before continuing */
while(WatchdogLockState() == WATCHDOG_LOCK_LOCKED)
{ }
/* update the reload value */
WatchdogReloadSet(object->reloadValue);
/* lock register access */
WatchdogLock();
Log_print2(Diags_USER1, "Watchdog: WDT with handle 0x%x has been set to "
"reload to 0x%x", (UArg)handle, value);
}
示例8: InterruptM3_intSend
/*!
* ======== InterruptM3_intSend ========
* Send interrupt to the remote processor
*/
Void InterruptM3_intSend(UInt16 remoteProcId, UArg arg)
{
Log_print2(Diags_USER1,
"InterruptM3_intSend: Sending interrupt with payload 0x%x to proc #%d",
(IArg)arg, (IArg)remoteProcId);
if (remoteProcId == sysm3ProcId) {
while(REG32(MAILBOX_FIFOSTATUS(SYSM3_MBX)));
REG32(MAILBOX_MESSAGE(SYSM3_MBX)) = arg;
}
else if (remoteProcId == appm3ProcId) {
while(REG32(MAILBOX_FIFOSTATUS(APPM3_MBX)));
/* Write to the mailbox, but this won't trigger an interrupt */
REG32(MAILBOX_MESSAGE(APPM3_MBX)) = arg;
/* Actually trigger the interrupt */
REG16(INTERRUPT_CORE_1) |= 0x1;
}
else if (remoteProcId == dspProcId) {
while(REG32(MAILBOX_FIFOSTATUS(DSP_MBX)));
REG32(MAILBOX_MESSAGE(DSP_MBX)) = arg;
}
else if (remoteProcId == hostProcId) {
while(REG32(MAILBOX_FIFOSTATUS(HOST_MBX)));
REG32(MAILBOX_MESSAGE(HOST_MBX)) = arg;
}
else {
/* Should never get here */
Assert_isTrue(FALSE, NULL);
}
}
示例9: doCmd
/*
* ======== doCmd ========
*/
static Int doCmd(Int cmdId, Processor_Handle proc)
{
Int result;
IArg key;
Log_print2(Diags_ENTRY, "[+E] doCmd> Enter (cmdId=%d, proc=0x%x)",
(IArg)cmdId, (IArg)proc);
//pthread_mutex_lock(&dcmd.gate);
key = GateThread_enter(dcmd.gate);
dcmd.proc = proc;
dcmd.cmdId = cmdId;
//pthread_cond_signal(&dcmd.cmdPresent);
SemThread_post(dcmd.cmdPresent, NULL);
//while (dcmd.reply == NONE) {
// pthread_cond_wait(&dcmd.replyPresent, &dcmd.gate);
//}
SemThread_pend(dcmd.replyPresent, SemThread_FOREVER, NULL);
result = dcmd.reply;
dcmd.reply = NONE;
//pthread_mutex_unlock(&dcmd.gate);
GateThread_leave(dcmd.gate, key);
Log_print1(Diags_EXIT, "[+X] doCmd> Exit (result=%d)", (IArg)result);
return (result);
}
示例10: VIDENCCOPY_TI_dmaGetChannels
/*
* ======== VIDENCCOPY_TI_dmaGetChannels ========
* Declare DMA resource requirement/holdings.
*/
Uns VIDENCCOPY_TI_dmaGetChannels(IALG_Handle handle, IDMA3_ChannelRec dmaTab[])
{
VIDENCCOPY_TI_Obj *videncObj = (Void *)handle;
int i;
Log_print2(Diags_ENTRY, "[+E] VIDENCCOPY_TI_dmaGetChannels(0x%x, 0x%x)",
(IArg)handle, (IArg)dmaTab);
/* Initial values on logical channels */
dmaTab[0].handle = videncObj->dmaHandle1D1D8B;
dmaTab[0].numTransfers = 1;
dmaTab[0].numWaits = 1;
/*
* Request logical DMA channels for use with ACPY3
* AND with environment size obtained from ACPY3 implementation
* AND with low priority.
*/
for (i = 0; i < NUM_LOGICAL_CH; i++) {
dmaTab[i].priority = IDMA3_PRIORITY_LOW;
dmaTab[i].persistent = FALSE;
dmaTab[i].protocol = &ACPY3_PROTOCOL;
}
return (NUM_LOGICAL_CH);
}
示例11: RcmClient_construct
Int RcmClient_construct(RcmClient_Struct *structPtr, String server,
const RcmClient_Params *params)
{
RcmClient_Object *obj = (RcmClient_Object*)structPtr;
Int status = RcmClient_S_SUCCESS;
Log_print1(Diags_ENTRY, "--> %s: ()", (IArg)FXNN);
/* TODO: add check that params was initialized correctly */
Log_print1(Diags_LIFECYCLE, FXNN": instance construct: 0x%x", (IArg)obj);
/* ensure the constructed object is zeroed */
_memset((Void *)obj, 0, sizeof(RcmClient_Object));
/* object-specific initialization */
status = RcmClient_Instance_init(obj, server, params);
if (status < 0) {
RcmClient_Instance_finalize(obj);
goto leave;
}
leave:
Log_print2(Diags_EXIT, "<-- %s: %d", (IArg)FXNN, (IArg)status);
return(status);
}
示例12: IRES_HDVICP2_getMemRecs
/* ARGSUSED - this line tells the compiler not to warn about unused args. */
IRES_Status IRES_HDVICP2_getMemRecs(IRES_Handle handle,
IRES_ProtocolArgs * resProtocolArgs, IALG_MemRec *memRecs)
{
Assert_isTrue(memRecs != NULL, (Assert_Id)NULL);
Assert_isTrue(resProtocolArgs != NULL, (Assert_Id)NULL);
Log_print3(Diags_ENTRY,
"[+E] IRES_HDVICP2_getMemRecs> Enter (handle=0x%x, "
"resProtocolArgs=0x%x, memRecs=0x%x)",
(IArg)handle, (IArg)resProtocolArgs, (IArg)memRecs);
memRecs[0].alignment = 4;
memRecs[0].size = sizeof(IRES_HDVICP2_IntObj);
/*
* IALG_EXTERNAL because we don't care where this memory is allocated
*/
memRecs[0].space = IALG_EXTERNAL;
/*
* Memory should be persistent.
*/
memRecs[0].attrs = IALG_PERSIST;
Log_print2(Diags_USER4,
"[+4] IRES_HDVICP2_getMemRecs> Amount of memory requested 0x%x, "
"alignment 0x%x, space IALG_EXTERNAL attrs IALG_PERSIST",
(IArg)(memRecs[0].size), (IArg)(memRecs[0].alignment));
Log_print0(Diags_EXIT,
"[+X] IRES_HDVICP2_getMemRecs> Exit (status=IRES_EOK)");
return (IRES_OK); /* number of MemRecs */
}
示例13: Memory_free
/*
* ======== Memory_free ========
*/
Bool Memory_free(Ptr addr, UInt size, Memory_AllocParams *params)
{
Log_print2(Diags_ENTRY, "[+E] Memory_free(0x%lx, 0x%lx)",
(IArg)addr, (IArg)size);
return (Memory_segFree(DEFAULTSEGMENT, addr, size));
}
示例14: RMAN_exit
/*
* ======== RMAN_exit ========
* Exit the generic IRES RMAN and free the memory back to the Memory manager
* using which it was created.
*/
IRES_Status RMAN_exit()
{
IArg key;
Int i;
IRES_Status status = IRES_OK;
if (rmanInit == 0) {
return (IRES_ENOINIT);
}
Log_print0(Diags_ENTRY, "[+E] RMAN_exit> Enter ");
rmanInternalState->info.refCount--;
if (--rmanInit == 0) {
if (initStatus != IRES_OK) {
Log_print0(Diags_USER7, "[+7] RMAN_exit> RMAN_init call didn't "
"happen successfully. RMAN_exit will not unregister "
"any resources.");
status = IRES_ENOINIT;
}
else {
key = IGateProvider_enter(gate);
Log_print1(Diags_EXIT, "[+X] RMAN_exit> tableIndex = %d",
(IArg)(resTable.tableIndex));
/* Unregister the entries */
Log_print0(Diags_EXIT, "[+X] RMAN_exit> Unregistering resources");
for (i = 0; i < resTable.tableIndex; i++) {
if (RMAN_TABLE[i] != NULL) {
/* Even if there is an error, unregister the rest */
if ((status = RMAN_TABLE[i]->exit()) != IRES_OK) {
Log_print2(Diags_USER7, "[+7] RMAN_exit> Error "
"unregistering the IRESMAN implementation "
"0x%x, status = %d",
(IArg)(RMAN_TABLE[i]), (IArg)status);
status = IRES_EFAIL;
}
}
}
/* Free the RMAN object */
freeInternalState();
initStatus = IRES_ENOINIT;
/* Free the gate after leaving it */
IGateProvider_leave(gate, key);
OsalSupport_deleteGate(gate);
gate = NULL;
}
}
Log_print1(Diags_EXIT, "[+X] RMAN_exit> Exit (status=%d)", (IArg)status);
return (status);
}
示例15: Memory_contigAlloc
/*
* ======== Memory_contigAlloc ========
*/
Ptr Memory_contigAlloc(UInt size, UInt align)
{
Log_print2(Diags_ENTRY, "[+E] Memory_contigAlloc(0x%lx, 0x%lx)",
(IArg)size, (IArg)align);
return (Memory_segAlloc(DEFAULTSEGMENT, size, align));
}