本文整理汇总了C++中Log_print0函数的典型用法代码示例。如果您正苦于以下问题:C++ Log_print0函数的具体用法?C++ Log_print0怎么用?C++ Log_print0使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Log_print0函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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(¶ms);
params.size = size;
params.buf = (Ptr)base;
HeapMem_construct(HeapMem_struct(heap), ¶ms);
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
示例16: USBMSCHFatFsTiva_diskRead
/*
* ======== USBMSCHFatFsTiva_diskRead ========
* This function reads sector(s) from the disk drive
*
* @param drv Drive Number
*
* @param buf Pointer to a buffer to which data is written
*
* @param sector Sector number to read from
*
* @param count Number of sectors to be read
*/
DRESULT USBMSCHFatFsTiva_diskRead(BYTE drv, BYTE *buf,
DWORD sector, BYTE count)
{
unsigned int key;
uint32_t driveRead;
USBMSCHFatFsTiva_Object *object = USBMSCHFatFs_config->object;
Log_print2(Diags_USER1, "USBMSCHFatFs: diskRead: Sector %d, Count %d",
sector, count);
if (object->state != USBMSCHFatFsTiva_CONNECTED) {
Log_print0(Diags_USER1, "USBMSCHFatFs: diskRead: not initialized");
return (RES_NOTRDY);
}
/* READ BLOCK */
key = GateMutex_enter(GateMutex_handle(&(object->gateUSBLibAccess)));
driveRead = USBHMSCBlockRead(object->MSCInstance, sector, buf, count);
GateMutex_leave(GateMutex_handle(&(object->gateUSBLibAccess)), key);
if (driveRead == 0) {
Log_print0(Diags_USER2, "USBMSCHFatFs: diskRead: OK");
return (RES_OK);
}
else {
Log_print0(Diags_USER2, "USBMSCHFatFs: diskRead: ERROR");
return (RES_ERROR);
}
}
开发者ID:DemonTu,项目名称:ALL_SmartBatterySwitch_CC2640,代码行数:41,代码来源:USBMSCHFatFsTiva.c
示例17: main
/*
* ======== main ========
*/
Int main(Int argc, Char* argv[])
{
Error_Block eb;
Task_Params taskParams;
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");
}
/* start scheduler, this never returns */
BIOS_start();
/* should never get here */
Log_print0(Diags_EXIT, "<-- main:");
return (0);
}
开发者ID:liyaoshi,项目名称:ipcdev,代码行数:30,代码来源:gatempapp.c
示例18: Algorithm_delete
/*
* ======== Algorithm_delete ========
*/
Void Algorithm_delete(Algorithm_Handle alg)
{
Algorithm_Obj *pObject = (Algorithm_Obj *)alg;
IRES_Status status;
Log_print1(Diags_ENTRY, "[+E] Algorithm_delete> Enter(alg=0x%x)",
(IArg)alg);
if (pObject != NULL) {
if (pObject->iresFxns) {
/* Call RMAN fuction to free resources */
status = RMAN_freeResources(pObject->alg, pObject->iresFxns,
pObject->groupId);
if (status != IRES_OK) {
Log_print1(Diags_USER7, "[+7] Algorithm_delete> Freeing "
"of alg resources through RMAN FAILED (0x%x)",
(IArg)status);
}
}
if (pObject->idma3Fxns) {
Log_print0(Diags_USER4, "[+4] Algorithm_delete> releasing "
"DMA resources");
DMAN3_releaseDmaChannels(&(pObject->alg), &(pObject->idma3Fxns),1);
}
if (pObject->alg) {
ALG_delete(pObject->groupId, pObject->alg, pObject->useCachedMem);
}
Memory_free(pObject, sizeof (*pObject), NULL);
}
Log_print0(Diags_EXIT, "[+X] Algorithm_delete> Exit");
}
开发者ID:andreimironenko,项目名称:codec-engine,代码行数:38,代码来源:Algorithm_noOS.c
示例19: smain
/* ARGSUSED */
Void smain(UArg arg0, UArg arg1)
{
SemThread_Params semParams;
Task_Params taskParams;
Task_Handle tsk;
Int i;
Log_print0(Diags_ENTRY, "[+E] smain> Enter ");
SemThread_Params_init(&semParams);
done = SemThread_create(0, &semParams, NULL);
SemThread_Params_init(&semParams);
mutex = SemThread_create(1, &semParams, NULL);
if ((done == NULL) || (mutex == NULL)) {
Log_print0(Diags_USER7, "[+7] smain> SemThread creation failed");
System_abort("SemThread_create failed \n");
}
Task_Params_init(&taskParams);
/*
* Add the following line to have the stack allocated from the external
* heap:
* taskParams.stackHeap = (IHeap_Handle)EXTMEM_HEAP;
*/
taskParams.stackSize = 0x1000;
for (i = 0; i < NUMTASKS; i++) {
Task_Params_init(&taskParams);
taskParams.priority = attrsTable[i].priority;
taskParams.arg0 = i + 1; /* task id */
taskParams.arg1 = i; /* index into attrsTable */
tsk = Task_create((Task_FuncPtr)rmanTask, &taskParams, NULL);
if (tsk == NULL) {
Log_print1(Diags_USER7, "[+7] smain> Task_create of task %d failed",
(IArg)(i + 1));
System_abort("Task_create() failed\n");
}
}
for (i = 0; i < NUMTASKS; i++) {
SemThread_pend(done, SemThread_FOREVER, NULL);
}
SemThread_delete(&mutex);
SemThread_delete(&done);
Log_print0(Diags_USER4, "[+4] smain> TEST PASSED ");
Log_print0(Diags_EXIT, "[+X] smain> Exit ");
}
开发者ID:andreimironenko,项目名称:framework_components,代码行数:59,代码来源:app.c
示例20: SystemCfg_closeSharedResources
Int SystemCfg_closeSharedResources(SystemCfg_AppFxn appShutdownFxn, Ptr arg)
{
Error_Block eb;
Int status = 0;
struct SystemCfg *stateObj = &SystemCfg_State;
Log_print1(Diags_ENTRY, "--> %s: ()", (IArg)FXNN);
Error_init(&eb);
/* invoke the application shutdown function */
if (appShutdownFxn != NULL) {
status = appShutdownFxn(arg);
if (status < 0) {
goto leave;
}
}
/* close shared resources from remote core */
/* <add code here> */
/* send close done event to remote core */
Log_print0(Diags_USER1, FXNN": send EvtCloseDone to remote core");
status = Notify_sendEvent(stateObj->hostProcId, Global_NotifyLineId,
Global_HostDspEvtNum, Global_EvtCloseDone, TRUE);
if (status < 0) {
/* Log_error() */
Log_print4(Diags_USER8,
"Error: %s, line %d: %s: Notify_sendEvent() returned error %d",
(IArg)__FILE__, (IArg)__LINE__, (IArg)FXNN, (IArg)status);
goto leave;
}
/* wait for close event from remote core */
Log_print0(Diags_USER1, FXNN": waiting for EvtCloseDone event...");
SemThread_pend(stateObj->semH, SemThread_FOREVER, &eb);
if (Error_check(&eb)) {
/* Log_error() */
Log_print3(Diags_USER8,
"Error: %s, line %d: %s: SemThread_pend() returned with error",
(IArg)__FILE__, (IArg)__LINE__, (IArg)FXNN);
status = -1;
goto leave;
}
Log_print0(Diags_USER1, FXNN": ...received EvtCloseDone event");
leave:
Log_print2(Diags_EXIT, "<-- %s: %d", (IArg)FXNN, (IArg)status);
return(status);
}
开发者ID:andreimironenko,项目名称:framework_components,代码行数:58,代码来源:SystemCfg_m3Video.c
注:本文中的Log_print0函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论