Changeset 36317 in vbox for trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
- Timestamp:
- Mar 18, 2011 5:33:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
r35941 r36317 337 337 #ifdef VBOX_CRHGSMI_WITH_D3DDEV 338 338 PCRVBOXHGSMI_CLIENT pClient = (PCRVBOXHGSMI_CLIENT)VBoxCrHgsmiQueryClient(); 339 Assert(pClient);339 CRASSERT(pClient); 340 340 return pClient; 341 341 #else … … 344 344 { 345 345 PVBOXUHGSMI pHgsmi = VBoxCrHgsmiCreate(); 346 Assert(pHgsmi);346 CRASSERT(pHgsmi); 347 347 if (pHgsmi) 348 348 { … … 351 351 if (RT_SUCCESS(rc)) 352 352 { 353 Assert(conn->HgsmiClient.pHgsmi);353 CRASSERT(conn->HgsmiClient.pHgsmi); 354 354 return &conn->HgsmiClient; 355 355 } … … 503 503 VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags; 504 504 int rc; 505 Assert(!pClient->pvHGBuffer);505 CRASSERT(!pClient->pvHGBuffer); 506 506 fFlags.Value = 0; 507 507 rc = pClient->pHGBuffer->pfnLock(pClient->pHGBuffer, 0, cbBuffer, fFlags, &pClient->pvHGBuffer); … … 536 536 { 537 537 int rc = CRVBOXHGSMI_BUF_WAIT(pClient->pCmdBuffer); 538 Assert(rc == 0);538 CRASSERT(rc == 0); 539 539 } 540 540 #endif … … 1327 1327 if (RT_FAILURE(rc) || RT_FAILURE(parms.hdr.result)) 1328 1328 { 1329 Assert(0);1330 1331 1329 crWarning("Host doesn't accept our version %d.%d. Make sure you have appropriate additions installed!", 1332 1330 parms.vMajor.u.value32, parms.vMinor.u.value32); … … 1357 1355 if (RT_FAILURE(rc) || RT_FAILURE(parms.hdr.result)) 1358 1356 { 1359 Assert(0);1360 1361 1357 crWarning("SHCRGL_GUEST_FN_SET_PID failed!"); 1362 1358 return FALSE; … … 1396 1392 if (g_crvboxhgcm.hGuestDrv == INVALID_HANDLE_VALUE) 1397 1393 { 1398 Assert(0);1399 1394 crDebug("could not open VBox Guest Additions driver! rc = %d\n", GetLastError()); 1400 1395 VBOXCRHGSMIPROFILE_FUNC_EPILOGUE(); … … 1411 1406 crDebug("could not open Guest Additions kernel module! rc = %d\n", errno); 1412 1407 VBOXCRHGSMIPROFILE_FUNC_EPILOGUE(); 1413 Assert(0);1414 1408 return FALSE; 1415 1409 } … … 1463 1457 { 1464 1458 crDebug("HGCM connect failed with rc=0x%x\n", info.result); 1465 Assert(0);1466 1459 1467 1460 VBOXCRHGSMIPROFILE_FUNC_EPILOGUE(); … … 1473 1466 #ifdef RT_OS_WINDOWS 1474 1467 DWORD winEr = GetLastError(); 1475 Assert(0);1476 1468 crDebug("IOCTL for HGCM connect failed with rc=0x%x\n", winEr); 1477 1469 #else … … 1640 1632 } 1641 1633 1642 Assert(bHasHGSMI >= 0);1634 CRASSERT(bHasHGSMI >= 0); 1643 1635 1644 1636 return bHasHGSMI; … … 1658 1650 1659 1651 buf = _crVBoxHGSMIBufAlloc(pClient, CRVBOXHGSMI_BUF_SIZE(cbSize)); 1660 Assert(buf);1652 CRASSERT(buf); 1661 1653 if (buf) 1662 1654 { … … 1713 1705 { 1714 1706 pvBuf = _crVBoxHGSMIDoAlloc(conn, pClient); 1715 Assert(pvBuf);1707 CRASSERT(pvBuf); 1716 1708 } 1717 1709 else … … 1740 1732 uint32_t cbBuffer; 1741 1733 1742 Assert(parms);1734 CRASSERT(parms); 1743 1735 1744 1736 parms->hdr.result = VERR_WRONG_ORDER; … … 1754 1746 1755 1747 pRecvBuffer = _crVBoxHGSMIRecvBufGet(pClient); 1756 Assert(pRecvBuffer);1748 CRASSERT(pRecvBuffer); 1757 1749 if (!pRecvBuffer) 1758 1750 return; … … 1777 1769 1778 1770 parms = (CRVBOXHGSMIREAD *)_crVBoxHGSMICmdBufferLockRo(pClient, sizeof (*parms)); 1779 Assert(parms);1771 CRASSERT(parms); 1780 1772 if (!parms) 1781 1773 { … … 1794 1786 { 1795 1787 void *pvData = _crVBoxHGSMIRecvBufData(pClient, cbBuffer); 1796 Assert(pvData);1788 CRASSERT(pvData); 1797 1789 if (pvData) 1798 1790 { … … 1842 1834 void *pvBuf; 1843 1835 pBuf = _crVBoxHGSMIBufAlloc(pClient, len); 1844 Assert(pBuf);1836 CRASSERT(pBuf); 1845 1837 if (!pBuf) 1846 1838 { … … 1850 1842 } 1851 1843 1852 Assert(!offBuffer);1844 CRASSERT(!offBuffer); 1853 1845 1854 1846 offBuffer = 0; … … 1881 1873 { 1882 1874 PVBOXUHGSMI_BUFFER pRecvBuffer = _crVBoxHGSMIRecvBufGet(pClient); 1883 Assert(pRecvBuffer);1875 CRASSERT(pRecvBuffer); 1884 1876 if (!pRecvBuffer) 1885 1877 { … … 1911 1903 1912 1904 parms = (CRVBOXHGSMIWRITEREAD *)_crVBoxHGSMICmdBufferLockRo(pClient, sizeof (*parms)); 1913 Assert(parms);1905 CRASSERT(parms); 1914 1906 if (parms) 1915 1907 { … … 1925 1917 { 1926 1918 void *pvData = _crVBoxHGSMIRecvBufData(pClient, cbWriteback); 1927 Assert(pvData);1919 CRASSERT(pvData); 1928 1920 if (pvData) 1929 1921 { … … 1937 1929 { 1938 1930 PVBOXUHGSMI_BUFFER pOldBuf = pClient->pHGBuffer; 1939 Assert(!pClient->pvHGBuffer);1931 CRASSERT(!pClient->pvHGBuffer); 1940 1932 CRASSERT(cbWriteback>pClient->pHGBuffer->cbBuffer); 1941 1933 crDebug("Reallocating host buffer from %d to %d bytes", conn->cbHostBufferAllocated, cbWriteback); … … 1988 1980 { 1989 1981 CRVBOXHGSMIINJECT *parms = (CRVBOXHGSMIINJECT *)_crVBoxHGSMICmdBufferLock(pClient, sizeof (*parms)); 1990 Assert(parms);1982 CRASSERT(parms); 1991 1983 if (!parms) 1992 1984 { … … 2110 2102 2111 2103 hgcm_buffer = (CRVBOXHGCMBUFFER *) *bufp - 1; 2112 Assert(hgcm_buffer->magic == CR_VBOXHGCM_BUFFER_MAGIC);2104 CRASSERT(hgcm_buffer->magic == CR_VBOXHGCM_BUFFER_MAGIC); 2113 2105 if (hgcm_buffer->kind != CR_VBOXHGCM_UHGSMI_BUFFER) 2114 2106 { … … 2125 2117 2126 2118 pBuf = _crVBoxHGSMIBufFromHdr(hgcm_buffer); 2127 Assert(pBuf);2119 CRASSERT(pBuf); 2128 2120 if (!pBuf) 2129 2121 { … … 2163 2155 { 2164 2156 VBOXCRHGSMIPROFILE_FUNC_PROLOGUE(); 2165 Assert(0);2166 2157 2167 2158 CRASSERT(0); … … 2183 2174 // pBuf = _crVBoxHGSMIBufFromMemPtr(buf); 2184 2175 // Assert(pBuf); 2185 Assert(0);2186 2176 CRASSERT(0); 2187 2177 // if (!pBuf) … … 2199 2189 VBOXCRHGSMIPROFILE_FUNC_PROLOGUE(); 2200 2190 2201 Assert(0);2191 CRASSERT(0); 2202 2192 2203 2193 _crVBoxHGCMReceiveMessage(conn); … … 2211 2201 { 2212 2202 VBOXCRHGSMIPROFILE_FUNC_PROLOGUE(); 2213 Assert(0);2203 CRASSERT(0); 2214 2204 2215 2205 CRASSERT(conn && conn->pHostBuffer); … … 2232 2222 PVBOXUHGSMI pHgsmi; 2233 2223 _crVBoxHGSMIClientTerm(&conn->HgsmiClient, &pHgsmi); 2234 Assert(pHgsmi);2224 CRASSERT(pHgsmi); 2235 2225 VBoxCrHgsmiDestroy(pHgsmi); 2236 2226 } … … 2243 2233 { 2244 2234 VBOXCRHGSMIPROFILE_FUNC_PROLOGUE(); 2245 Assert(0);2235 CRASSERT(0); 2246 2236 2247 2237 _crVBoxHGSMIFree(conn, mess); … … 2254 2244 { 2255 2245 VBOXCRHGSMIPROFILE_FUNC_PROLOGUE(); 2256 Assert(0);2246 CRASSERT(0); 2257 2247 2258 2248 CRASSERT(FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.