/* * ======== GetSymbolIndex ======== */ Int GetSymbolIndex (Void) { Int status = 0; /* Get remote function index */ Osal_printf ("\nGetSymbolIndex: Querying server for fxnDouble() function " "index \n"); status = RcmClient_getSymbolIndex (rcmClientHandle, "fxnDouble", &fxnDoubleIdx); if (status < 0) Osal_printf ("GetSymbolIndex: Error getting fxnDouble symbol index" "[0x%x]\n", status); else Osal_printf ("GetSymbolIndex: fxnDouble() symbol index [0x%x]\n", fxnDoubleIdx); Osal_printf ("GetSymbolIndex: Querying server for fxnExit() function " "index \n"); status = RcmClient_getSymbolIndex (rcmClientHandle, "fxnExit", &fxnExitIdx); if (status < 0) Osal_printf ("GetSymbolIndex: Error getting fxnExit symbol index" " [0x%x]\n", status); else Osal_printf ("GetSymbolIndex: fxnExit() symbol index [0x%x]\n", fxnExitIdx); return status; }
static Int dvsdk_grapx_display_rpc_remote_mode_init () { RcmClient_Params rcmClientParams; IArg key; Bool doInit = FALSE; Int status = 0; key = Gate_enterSystem(); if (FALSE == g_RemoteStubContext.bRemoteInitDone) { doInit = TRUE; } Gate_leaveSystem(key); if (TRUE == doInit) { GateThread_Params gtParams; GateThread_Params_init (>Params); g_RemoteStubContext.hGate = GateThread_Handle_upCast(GateThread_create(>Params, NULL)); key = GateH_enter (g_RemoteStubContext.hGate); MessageQ_registerHeap(SharedRegion_getHeap(0),Global_GrpxDssMsgHeapId); RcmClient_Params_init (&rcmClientParams); rcmClientParams.heapId = Global_GrpxDssMsgHeapId; do { status = RcmClient_create(DVSDK_DSS_GRPX_SERVER_NAME, &rcmClientParams, &g_RemoteStubContext.hRcmClient); if (status < 0) { Thread_yield(NULL); } } while (status < 0); if (0 == status) { status = RcmClient_getSymbolIndex (g_RemoteStubContext.hRcmClient, DVSDK_DSS_GRPX_INIT_FXN_NAME, &g_RemoteStubContext.nInitFxnIdx); } if (0 == status) { status = RcmClient_getSymbolIndex (g_RemoteStubContext.hRcmClient, DVSDK_DSS_GRPX_START_FXN_NAME, &g_RemoteStubContext.nStartFxnIdx); } if (0 == status) { status = RcmClient_getSymbolIndex (g_RemoteStubContext.hRcmClient, DVSDK_DSS_GRPX_STOP_FXN_NAME, &g_RemoteStubContext.nStopFxnIdx); } if (0 == status) { status = RcmClient_getSymbolIndex (g_RemoteStubContext.hRcmClient, DVSDK_DSS_GRPX_DEINIT_FXN_NAME, &g_RemoteStubContext.nDeinitFxnIdx); } if (0 == status) { status = RcmClient_getSymbolIndex (g_RemoteStubContext.hRcmClient, DVSDK_DSS_GRPX_DISPLAYTOGGLE_FXN_NAME, &g_RemoteStubContext.nDisplayToggelFxnIdx); } g_RemoteStubContext.bRemoteInitDone = TRUE; GateH_leave(g_RemoteStubContext.hGate, key); } return status; }