当前位置: 首页>>代码示例>>C++>>正文


C++ Log_print0函数代码示例

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


在下文中一共展示了Log_print0函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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);
}
开发者ID:andreimironenko,项目名称:framework_components,代码行数:65,代码来源:rman.c

示例2: RMAN_deactivateAllResources

/* ARGSUSED - this line tells the compiler not to warn about unused args. */
IRES_Status RMAN_deactivateAllResources(IALG_Handle alg, IRES_Fxns * resFxns,
        Int scratchGroupId)
{
    IRES_Status status;

    if (initStatus != IRES_OK) {
        Log_print0(Diags_USER7, "[+7] RMAN_deactivateAllResources> "
                "RMAN_init call hasn't happened successfully. Please "
                "initialize RMAN before calling any other RMAN API");

        Log_print0(Diags_EXIT, "[+X] RMAN_deactivateAllResources> "
                "Exit (status=IRES_ENOINIT)");

        return (IRES_ENOINIT);
    }

    Log_print3(Diags_ENTRY, "[+E] RMAN_deactivateAllResources> "
            "Enter (alg=0x%x, resFxns=0x%x, scratchGroupId=%d)",
            (IArg)alg, (IArg)resFxns, (IArg)scratchGroupId);

    status = resFxns->deactivateAllResources(alg);

    Log_print1(Diags_EXIT, "[+X] RMAN_deactivateAllResources> Exit (status=%d)",
            (IArg)status);

    return (status);
}
开发者ID:andreimironenko,项目名称:framework_components,代码行数:28,代码来源:rman.c

示例3: Dsp_AppTask

Void Dsp_AppTask (UArg arg1, UArg arg2)
{
  OMX_ERRORTYPE eError = OMX_ErrorNone;
  //TIMM_OSAL_ERRORTYPE osalError = TIMM_OSAL_ERR_NONE;

  /*--------------------------------------------------------------------------*/
  /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  /* Initiailize the system. The initialization can include driver, syslink */
  /* cache.  */
  /*--------------------------------------------------------------------------*/
  Log_print0 (Diags_USER1,"DSP: In Dsp_AppTask");
  platform_init ();
  Log_print0 (Diags_USER1,"DSP: Platform Initialized");

  while (TRUE)
  {
    Task_sleep (DSP_APP_TASK_SLEEP_DURATION);
  }

  /*--------------------------------------------------------------------------*/
  /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  /* UnInitiailize the system.  */
  /*--------------------------------------------------------------------------*/
  platform_deinit ();
  Log_print0 (Diags_USER1,"DSP: Platform De-Initialized");

  Log_print0 (Diags_USER1,"DSP: Exiting the system");
  System_exit (0);

//EXIT:
  if (eError != OMX_ErrorNone)
  {
    Log_print1 (Diags_USER1,"Error in executing app. Failed code:%d", eError);
  }
}                               /* Dsp_AppTask */
开发者ID:andreimironenko,项目名称:omx,代码行数:35,代码来源:main_c674.c

示例4: RMAN_activateResource

/* ARGSUSED - this line tells the compiler not to warn about unused args. */
IRES_Status RMAN_activateResource(IALG_Handle alg,
        IRES_Handle resourceHandle, IRES_Fxns * resFxns, Int scratchGroupId)
{
    IRES_Status status;

    if (initStatus != IRES_OK) {
        Log_print0(Diags_USER7, "[+7] RMAN_activateResource> RMAN_init "
                "call hasn't happened successfully. Please initialize "
                "RMAN before calling any other RMAN API");
        Log_print0(Diags_EXIT, "[+X] RMAN_activateResource> Exit "
                "(status=IRES_ENOINIT)");
        return (IRES_ENOINIT);
    }

    Log_print4(Diags_ENTRY, "[+E] RMAN_activateResource> Enter "
            "(alg=0x%x, resourceHandle=0x%x, resFxns=0x%x, scratchGroupId=%d",
            (IArg)alg, (IArg)resourceHandle, (IArg)resFxns,
            (IArg)scratchGroupId);

    status = resFxns->activateResource(alg, resourceHandle);

    Log_print1(Diags_EXIT, "[+X] RMAN_activateResource> Exit (status=%d)",
            (IArg)status);

    return (status);
}
开发者ID:andreimironenko,项目名称:framework_components,代码行数:27,代码来源:rman.c

示例5: USBMSCHFatFsTiva_usbHCDEvents

/*
 *  ======== USBMSCHFatFsTiva_usbHCDEvents ========
 *  Generic USB Host Class Driver event callback.
 *
 *  This callback is called to notify the application that an unknown
 *  device was connected.
 */
static void USBMSCHFatFsTiva_usbHCDEvents(void *cbData)
{
    tEventInfo                 *pEventInfo = (tEventInfo *)cbData;
    USBMSCHFatFsTiva_Object    *object = USBMSCHFatFs_config->object;

    switch (pEventInfo->ui32Event) {
        case USB_EVENT_UNKNOWN_CONNECTED:
            /* An unknown device was detected. */
            object->state = USBMSCHFatFsTiva_UNKNOWN;
            Log_print0(Diags_USER2, "USBMSCHFatFs: usbHCDEvent Callback: "
                                    "UNKNOWN DEVICE CONNECTED");
            break;

        case USB_EVENT_DISCONNECTED:
            /* Unknown device has been removed. */
            object->state = USBMSCHFatFsTiva_NO_DEVICE;
            Log_print0(Diags_USER2, "USBMSCHFatFs: usbHCDEvent Callback: "
                                    "UNKNOWN DEVICE DISCONNECTED");
            break;

        case USB_EVENT_POWER_FAULT:
            /* No power means no device is present. */
            object->state = USBMSCHFatFsTiva_POWER_FAULT;
            Log_print0(Diags_USER2, "USBMSCHFatFs: usbHCDEvent Callback: "
                                    "POWER FAULT");
            break;

        default:
            break;
    }
}
开发者ID:DemonTu,项目名称:ALL_SmartBatterySwitch_CC2640,代码行数:38,代码来源:USBMSCHFatFsTiva.c

示例6: switch

/*
 * This event indicates that a Set_Report request was received from the host
 * The application needs to supply a buffer to retrieve the report data that will be sent
 * as part of this request. This handler is passed the reportType, reportId, the length of data
 * phase as well as the interface number.
 */
uint8_t *USBHID_handleEP0SetReport(uint8_t reportType, uint8_t reportId,
                                   uint16_t requestedLength,
                                   uint8_t intfnum)
{
    switch (reportType) {
    case USB_REQ_HID_INPUT:
        /* Return pointer to input Report Buffer */
        Log_print0(Diags_USER1, "USB: USBHID_handleEP0SetReport: USB_REQ_HID_INPUT");
        return 0;

    case USB_REQ_HID_OUTPUT:
        /* Return pointer to output Report Buffer */
        Log_print0(Diags_USER1, "USB: USBHID_handleEP0SetReport: USB_REQ_HID_OUTPUT");
        return 0;

    case USB_REQ_HID_FEATURE:
        /* Return pointer to feature Report Buffer */
        Log_print0(Diags_USER1, "USB: USBHID_handleEP0SetReport: USB_REQ_HID_FEATURE");
        return 0;

    default:
        Log_print0(Diags_USER1, "USB: USBHID_handleEP0SetReport: default");
        return 0;
    }
}
开发者ID:kfurlong,项目名称:sensortag,代码行数:31,代码来源:USBCDCMOUSE.c

示例7: 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(&params);
    params.size = size;
    params.buf = (Ptr)base;

    HeapMem_construct(HeapMem_struct(heap), &params);

    return (TRUE);
}
开发者ID:mobiaqua,项目名称:ti-ce,代码行数:38,代码来源:Memory_BIOS.c

示例8: USBMSCHFatFsTiva_diskWrite

/*
 *  ======== USBMSCHFatFsTiva_diskWrite ========
 *  This function writes sector(s) to the disk drive
 *
 *  @param  drv     Drive Number
 *
 *  @param  buf     Pointer to a buffer from which data is read
 *
 *  @param  sector  Sector number to write to
 *
 *  @param  count   Number of sectors to be written
 */
DRESULT USBMSCHFatFsTiva_diskWrite(BYTE drv, const BYTE *buf,
                                   DWORD sector, BYTE count)
{
    unsigned int                key;
    uint32_t                    driveWrite;
    USBMSCHFatFsTiva_Object    *object = USBMSCHFatFs_config->object;

    Log_print2(Diags_USER1, "USBMSCHFatFs: diskWrite: Sector %d, Count %d",
                             sector, count);

    if (!count) {
        Log_print0(Diags_USER1, "USBMSCHFatFs: diskWrite: ERROR");
        return (RES_PARERR);
    }

    if (object->state != USBMSCHFatFsTiva_CONNECTED) {
        Log_print0(Diags_USER1, "USBMSCHFatFs: diskWrite: not initialized");
        return (RES_NOTRDY);
    }

    key = GateMutex_enter(GateMutex_handle(&(object->gateUSBLibAccess)));
    driveWrite = USBHMSCBlockWrite(object->MSCInstance, sector, (uint8_t *)buf, count);
    GateMutex_leave(GateMutex_handle(&(object->gateUSBLibAccess)), key);

    if (driveWrite == 0) {
        Log_print0(Diags_USER2, "USBMSCHFatFs: diskWrite: OK");
        return (RES_OK);
    }
    else {
        Log_print0(Diags_USER2, "USBMSCHFatFs: diskWrite: ERROR");
        return (RES_ERROR);
    }
}
开发者ID:DemonTu,项目名称:ALL_SmartBatterySwitch_CC2640,代码行数:45,代码来源:USBMSCHFatFsTiva.c

示例9: IpcPower_suspendSwi

static Void IpcPower_suspendSwi(UArg arg0, UArg arg1)
{
#ifndef SMP
    if (MultiProc_self() == sysm3ProcId) {
#endif
        Log_print0(Diags_INFO, FXNN":Core0 Hibernation Swi");
#ifndef SMP
        PowerSuspArgs.pmMasterCore = MASTERCORE;
    }
    else if (MultiProc_self() == appm3ProcId) {
        Log_print0(Diags_INFO, FXNN":Core1 Hibernation Swi");
        PowerSuspArgs.pmMasterCore = NO_MASTERCORE;
    }
#endif
    if (refWakeLockCnt) {
        System_printf("Warning: Wake locks in use\n");
    }

    Power_suspend(&PowerSuspArgs);
#ifndef SMP
    IpcPower_sleepMode(IpcPower_SLEEP_MODE_DEEPSLEEP);
    IpcPower_setWugen();

    Log_print0(Diags_INFO, FXNN":Resume");
#endif
}
开发者ID:Hashcode,项目名称:sysbios-rpmsg,代码行数:26,代码来源:IpcPower.c

示例10: VirtQueue_startup

/*!
 * ======== VirtQueue_startup ========
 */
Void VirtQueue_startup()
{
    hostProcId      = MultiProc_getId("HOST");
#ifndef SMP
    dsp1ProcId       = MultiProc_getId("DSP1");
    sysm3ProcId     = MultiProc_getId("CORE0");
    appm3ProcId     = MultiProc_getId("CORE1");
#endif

#ifdef DSP
    intInfo.intVectorId = DSPEVENTID;
#else
    /* Initilize the IpcPower module */
    IpcPower_init();
#endif

    /*
     * Wait for HLOS (Virtio device) to indicate that priming of host's receive
     * buffers is complete, indicating that host is ready to send.
     *
     * Though this is a Linux Virtio configuration status, it must be
     * implemented by each non-Linux HLOS as well.
     */
    Log_print1(Diags_USER1, "VirtQueue_startup: VDEV status: 0x%x\n",
              Resource_getVdevStatus(VIRTIO_ID_RPMSG));
    Log_print0(Diags_USER1, "VirtQueue_startup: Polling VDEV status...\n");
    while (Resource_getVdevStatus(VIRTIO_ID_RPMSG) != VRING_BUFS_PRIMED);
    Log_print1(Diags_USER1, "VirtQueue_startup: VDEV status: 0x%x\n",
              Resource_getVdevStatus(VIRTIO_ID_RPMSG));

    InterruptProxy_intRegister(hostProcId, &intInfo, (Fxn)VirtQueue_isr, NULL);
    Log_print0(Diags_USER1, "Passed VirtQueue_startup\n");
}
开发者ID:Hashcode,项目名称:ipcdev,代码行数:36,代码来源:VirtQueue.c

示例11: IRESMAN_HDVICP_exit

/*
 *  ======== IRESMAN_HDVICP_exit ========
 *  Function called when RESMAN is no longer needed. Use it to free memory
 *  allocated etc
 */
IRES_Status IRESMAN_HDVICP_exit()
{
    Log_print0(Diags_ENTRY, "[+E] IRESMAN_HDVICP_exit> Enter");

    if (!(_initialized)) {
        Log_print0(Diags_EXIT,
                "[+X] IRESMAN_HDVICP_exit> Exit (status=IRES_ENOINIT)");

        return (IRES_ENOINIT);
    }

#ifdef xdc_target__os_Linux
    if (gate) {
        OsalSupport_deleteGate(gate);
        gate = NULL;
    }
#endif

    /* Set the initialized flag to zero again */
    _initialized = 0;

    _resmanInternalState->numOpens--;

    freeInternalState();

    Log_print0(Diags_EXIT, "[+X] IRESMAN_HDVICP_exit> Exit (status=IRES_OK)");

    return (IRES_OK);
}
开发者ID:mobiaqua,项目名称:ti-fc,代码行数:34,代码来源:iresman_hdvicp.c

示例12: main

Int main(Int argc, Char* argv[])
{
    Error_Block     eb;
    Task_Params     taskParams;
    Registry_Result result;

    Log_print0(Diags_ENTRY, "--> main:");

    /* must initialize the error block before using it */
    Error_init(&eb);

    /* create main thread (interrupts not enabled in main on BIOS) */
    Task_Params_init(&taskParams);
    taskParams.instance->name = "smain";
    taskParams.stackSize = 0x1000;
    Task_create(smain, &taskParams, &eb);

    if (Error_check(&eb)) {
        System_abort("main: failed to create application startup thread");
    }

    /* register with xdc.runtime to get a diags mask */
    result = Registry_addModule(&Registry_CURDESC, MODULE_NAME);
    Assert_isTrue(result == Registry_SUCCESS, (Assert_Id)NULL);

    /* start scheduler, this never returns */
    BIOS_start();

    /* should never get here */
    Log_print0(Diags_EXIT, "<-- main:");
    return (0);
}
开发者ID:liyaoshi,项目名称:ipcdev,代码行数:32,代码来源:NameServerApp.c

示例13: Global_init

/*
 *  ======== Global_init ========
 */
Void Global_init(Void)
{
    Int i;
    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_osal_Global_desc,
                Global_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(Global_MODNAME);
        }
        regInit = 1;
    }

    Log_print0(Diags_ENTRY, "[+E] Global_init> Enter");

    if (curInit != TRUE) {
        curInit = TRUE;

        Log_print0(Diags_USER4, "[+4] Global_init> This program was built "
                "with the following packages:");
        for (i = 0; Global_buildInfo[i] != NULL; i++) {
            Log_print1(Diags_USER4, "[+4] %s", (IArg)(Global_buildInfo[i]));
        }
    }
}
开发者ID:andreimironenko,项目名称:codec-engine,代码行数:38,代码来源:Global_noOS.c

示例14: main

/* ARGSUSED */
int main(Int argc, Char * argv[])
{
    IRES_Status status;
    Int         size = 0;

    FCSettings_init();
    Diags_setMask(FCSETTINGS_MODNAME"+EX1234567");
    Diags_setMask("xdc.runtime.Main+EX1234567");
    Diags_setMask("ti.sdo.fc.%+EX1234567");

    Log_print0(Diags_ENTRY, "[+E] _main> Enter");

    status = RMAN_init();
    if (IRES_OK != status) {
        Log_print1(Diags_USER7, "[+7] main> RMAN_init() failed [%d]",
                   (IArg)status);
        System_abort("RMAN_init() failed, aborting...\n");
    }

    Log_print0(Diags_EXIT, "[+X] main> Exit");

    BIOS_start();

    return(0);
}
开发者ID:skitlab,项目名称:ti-framework_components,代码行数:26,代码来源:main_BIOS.c

示例15: main

/* ARGSUSED */
int main(Int argc, Char * argv[])
//int main(UArg argc, UArg argv)
{
    IRES_Status status;
    Int         size = 0;

#if 0
    // TODO: Convert to Diags_setMask()
    GT_set(MODNAME "=01234567");
    GT_set("ti.sdo.fc.rman" "=4567");
    GT_set("ti.sdo.fc.dskt2" "=67");
    GT_set("ti.sdo.fc.ires.hdvicp" "=01234567");
    /*      GT_set("ti.sdo.fc.dskt2" "=01234567");*/
#endif
    Log_print0(Diags_ENTRY, "[+E] _main> Enter ");

    status = RMAN_init();
    if (IRES_OK != status) {
        Log_print1(Diags_USER7, "[+7] main> RMAN_init() failed [%d]",
                   (IArg)status);
        return (-1);
    }

    Log_print0(Diags_EXIT, "[+X] main> Exit");

    smain(argc, argv);

    return (0);
}
开发者ID:skitlab,项目名称:ti-framework_components,代码行数:30,代码来源:main_native.c


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