Void Audio_systemProcDeInit (Void) { Int32 state; Int32 status; state = ProcMgr_getState (procMgrHandle); status = ProcMgr_close (&procMgrHandle); SysLink_destroy (); }
int main (int argc, char ** argv) { Int status = 0; //ServiceMgr_Config serviceMgrConfig; Int i, j; /* * Must be at least one set of procId and outfile. So argc cannot be odd */ if ((argc < 3) || (argc / 2 * 2 == argc) || (argc > 7)) { Osal_printf ("uiaDemo <procId> <outfile> [<procId> <outfile>] [<procId> <outfile>]\n"); return (-1); } for (i = 0, j = 1 ; i < argc/2; i++, j = j + 2) { uiaDemo_procId[i] = strtol (argv [j], NULL, 16); uiaDemo_filePath[i] = argv [j + 1]; uiaDemo_numProcessors++; } Osal_printf ("Running on %d processors\n", uiaDemo_numProcessors); Osal_printf ("Calling SysLink_setup\n"); SysLink_setup (); Osal_printf ("Calling uiaDemo_startup\n"); status = uiaDemo_startup (); /* write to a binary file instead of sending out over Ethernet */ //ServiceMgr_getConfig (&serviceMgrConfig); //strcpy(serviceMgrConfig.fileName, "eventDump"); //status = ServiceMgr_setConfig (&serviceMgrConfig); //Osal_printf ("ServiceMgr_setConfig status = [0x%x]\n", status); Osal_printf ("Calling ServiceMgr_start\n"); ServiceMgr_start(); Osal_printf ("Calling uiaDemo_execute\n"); status = uiaDemo_execute (); Osal_printf ("Calling ServiceMgr_stop\n"); ServiceMgr_stop(); Osal_printf ("Calling uiaDemo_shutdown\n"); status = uiaDemo_shutdown (); Osal_printf ("Calling SysLink_destroy\n"); SysLink_destroy (); return (0); }
Int32 System_ipcDeInit() { printf(" %u: SYSTEM: IPC de-init in progress !!!\n", OSA_getCurTimeInMsec()); System_ipcNotifyDeInit(); System_ipcMsgQDeInit(); SysLink_destroy (); printf(" %u: SYSTEM: IPC de-init DONE !!!\n", OSA_getCurTimeInMsec()); return OSA_SOK; }
int main (int argc, char ** argv) { Int status = 0; Int i, j; /* * Must be at least one set of procId and outfile. So argc cannot be odd */ if ((argc < 3) || (argc / 2 * 2 == argc) || (argc > 7)) { Osal_printf ("uiaDaemon <procId> <outfile> [<procId> <outfile>] [<procId> <outfile>]\n"); return (-1); } for (i = 0, j = 1 ; i < argc/2; i++, j = j + 2) { loader_procId[i] = strtol (argv [j], NULL, 16); loader_filePath[i] = argv [j + 1]; loader_numProcessors++; } Osal_printf ("Running on %d processors\n", loader_numProcessors); Osal_printf ("Calling SysLink_setup\n"); SysLink_setup (); Osal_printf ("Calling loader_startup\n"); status = loader_startup (); Osal_printf ("Calling loader_execute\n"); status = loader_execute (); Osal_printf ("Calling loader_shutdown\n"); status = loader_shutdown (); Osal_printf ("Calling SysLink_destroy\n"); SysLink_destroy (); return (0); }
/* * ======== cleanup ======== */ static Void cleanup(Void) { static CmdObj dcmdInit = {NULL, NULL, NONE, NONE, NULL, NULL, NULL}; if (curInit != FALSE) { curInit = FALSE; if (dcmd.dproc != NULL) { doCmd(EXIT, NULL); // Thread_join(dcmd.dproc); Thread_delete(&dcmd.dproc); /* will do join first? */ dcmd.dproc = NULL; } Log_print0(Diags_USER2, "[+2] Processor cleanup()> " "SysLink_destroy()..."); SysLink_destroy(); Log_print0(Diags_USER2, "[+2] Processor cleanup()> " "... SysLink_destroy() complete"); if (dcmd.cmdPresent != NULL) { SemThread_delete(&dcmd.cmdPresent); dcmd.cmdPresent = NULL; } if (dcmd.replyPresent != NULL) { SemThread_delete(&dcmd.replyPresent); dcmd.replyPresent = NULL; } if (dcmd.gate != NULL) { GateThread_delete(&dcmd.gate); dcmd.gate = NULL; } dcmd = dcmdInit; } }