static IMG_INT PVRSRVBridgeSyncPrimOpReady(IMG_UINT32 ui32BridgeID, PVRSRV_BRIDGE_IN_SYNCPRIMOPREADY *psSyncPrimOpReadyIN, PVRSRV_BRIDGE_OUT_SYNCPRIMOPREADY *psSyncPrimOpReadyOUT, CONNECTION_DATA *psConnection) { SERVER_OP_COOKIE * psServerCookieInt = IMG_NULL; IMG_HANDLE hServerCookieInt2 = IMG_NULL; PVRSRV_BRIDGE_ASSERT_CMD(ui32BridgeID, PVRSRV_BRIDGE_SYNC_SYNCPRIMOPREADY); { /* Look up the address from the handle */ psSyncPrimOpReadyOUT->eError = PVRSRVLookupHandle(psConnection->psHandleBase, (IMG_HANDLE *) &hServerCookieInt2, psSyncPrimOpReadyIN->hServerCookie, PVRSRV_HANDLE_TYPE_SERVER_OP_COOKIE); if(psSyncPrimOpReadyOUT->eError != PVRSRV_OK) { goto SyncPrimOpReady_exit; } /* Look up the data from the resman address */ psSyncPrimOpReadyOUT->eError = ResManFindPrivateDataByPtr(hServerCookieInt2, (IMG_VOID **) &psServerCookieInt); if(psSyncPrimOpReadyOUT->eError != PVRSRV_OK) { goto SyncPrimOpReady_exit; } } psSyncPrimOpReadyOUT->eError = PVRSRVSyncPrimOpReadyKM( psServerCookieInt, &psSyncPrimOpReadyOUT->bReady); SyncPrimOpReady_exit: return 0; }
PVRSRV_ERROR PVRSRVSyncPrimOpCompleteKM(SERVER_OP_COOKIE *psServerCookie) { IMG_BOOL bReady; PVRSRVSyncPrimOpReadyKM(psServerCookie, &bReady); /* Check the client is playing ball */ if (!bReady) { PVR_DPF((PVR_DBG_ERROR, "%s: sync op still not ready", __FUNCTION__)); return PVRSRV_ERROR_BAD_SYNC_STATE; } return _SyncPrimOpComplete(psServerCookie); }
IMG_INTERNAL PVRSRV_ERROR IMG_CALLCONV BridgeSyncPrimOpReady(IMG_HANDLE hBridge, IMG_HANDLE hServerCookie, IMG_BOOL *pbReady) { PVRSRV_ERROR eError; SERVER_OP_COOKIE * psServerCookieInt; PVR_UNREFERENCED_PARAMETER(hBridge); psServerCookieInt = (SERVER_OP_COOKIE *) hServerCookie; eError = PVRSRVSyncPrimOpReadyKM( psServerCookieInt, pbReady); return eError; }