儲存庫 vbox 的更動 18534
- 時間撮記:
- 2009-3-30 下午12:03:12 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/PDMDevHlp.cpp
r18143 r18534 42 42 #include <iprt/string.h> 43 43 #include <iprt/thread.h> 44 45 46 /******************************************************************************* 47 * Defined Constants And Macros * 48 *******************************************************************************/ 49 /** @def PDM_DEVHLP_DEADLOCK_DETECTION 50 * Define this to enable the deadlock detection when accessing physical memory. 51 */ 52 #if defined(DEBUG_bird) || defined(DOXYGEN_RUNNING) 53 # define PDM_DEVHLP_DEADLOCK_DETECTION 54 #endif 44 55 45 56 … … 2028 2039 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhys, pvBuf, cbRead)); 2029 2040 2041 #ifdef VBOX_WITH_NEW_PHYS_CODE 2042 #if defined(VBOX_STRICT) && defined(PDM_DEVHLP_DEADLOCK_DETECTION) 2043 if (!VM_IS_EMT(pVM)) /** @todo not true for SMP. oh joy! */ 2044 { 2045 char szNames[128]; 2046 uint32_t cLocks = PDMR3CritSectCountOwned(pVM, szNames, sizeof(szNames)); 2047 AssertMsg(cLocks == 0, ("cLocks=%u %s\n", cLocks, szNames)); 2048 } 2049 #endif 2050 2030 2051 int rc; 2031 #ifdef VBOX_WITH_NEW_PHYS_CODE2032 2052 if (VM_IS_EMT(pVM)) 2033 2053 rc = PGMPhysRead(pVM, GCPhys, pvBuf, cbRead); … … 2036 2056 #else 2037 2057 PGMPhysRead(pVM, GCPhys, pvBuf, cbRead); 2038 rc = VINF_SUCCESS;2058 int rc = VINF_SUCCESS; 2039 2059 #endif 2040 2060 Log(("pdmR3DevHlp_PhysRead: caller='%s'/%d: returns %Rrc\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc)); … … 2051 2071 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhys, pvBuf, cbWrite)); 2052 2072 2073 #ifdef VBOX_WITH_NEW_PHYS_CODE 2074 #if defined(VBOX_STRICT) && defined(PDM_DEVHLP_DEADLOCK_DETECTION) 2075 if (!VM_IS_EMT(pVM)) /** @todo not true for SMP. oh joy! */ 2076 { 2077 char szNames[128]; 2078 uint32_t cLocks = PDMR3CritSectCountOwned(pVM, szNames, sizeof(szNames)); 2079 AssertMsg(cLocks == 0, ("cLocks=%u %s\n", cLocks, szNames)); 2080 } 2081 #endif 2082 2053 2083 int rc; 2054 #ifdef VBOX_WITH_NEW_PHYS_CODE2055 2084 if (VM_IS_EMT(pVM)) 2056 2085 rc = PGMPhysWrite(pVM, GCPhys, pvBuf, cbWrite); … … 2059 2088 #else 2060 2089 PGMPhysWrite(pVM, GCPhys, pvBuf, cbWrite); 2061 rc = VINF_SUCCESS;2090 int rc = VINF_SUCCESS; 2062 2091 #endif 2063 2092 Log(("pdmR3DevHlp_PhysWrite: caller='%s'/%d: returns %Rrc\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc)); … … 2075 2104 AssertReturn(!fFlags, VERR_INVALID_PARAMETER); 2076 2105 2106 #ifdef VBOX_WITH_NEW_PHYS_CODE 2107 #if defined(VBOX_STRICT) && defined(PDM_DEVHLP_DEADLOCK_DETECTION) 2108 if (!VM_IS_EMT(pVM)) /** @todo not true for SMP. oh joy! */ 2109 { 2110 char szNames[128]; 2111 uint32_t cLocks = PDMR3CritSectCountOwned(pVM, szNames, sizeof(szNames)); 2112 AssertMsg(cLocks == 0, ("cLocks=%u %s\n", cLocks, szNames)); 2113 } 2114 #endif 2115 #endif 2116 2077 2117 int rc = PGMR3PhysGCPhys2CCPtrExternal(pVM, GCPhys, ppv, pLock); 2078 2118 … … 2091 2131 AssertReturn(!fFlags, VERR_INVALID_PARAMETER); 2092 2132 2133 #ifdef VBOX_WITH_NEW_PHYS_CODE 2134 #if defined(VBOX_STRICT) && defined(PDM_DEVHLP_DEADLOCK_DETECTION) 2135 if (!VM_IS_EMT(pVM)) /** @todo not true for SMP. oh joy! */ 2136 { 2137 char szNames[128]; 2138 uint32_t cLocks = PDMR3CritSectCountOwned(pVM, szNames, sizeof(szNames)); 2139 AssertMsg(cLocks == 0, ("cLocks=%u %s\n", cLocks, szNames)); 2140 } 2141 #endif 2142 #endif 2143 2093 2144 int rc = PGMR3PhysGCPhys2CCPtrReadOnlyExternal(pVM, GCPhys, ppv, pLock); 2094 2145 … … 2123 2174 if (!VM_IS_EMT(pVM)) 2124 2175 return VERR_ACCESS_DENIED; 2176 #if defined(VBOX_STRICT) && defined(PDM_DEVHLP_DEADLOCK_DETECTION) 2177 /** @todo SMP. */ 2178 #endif 2125 2179 2126 2180 int rc = PGMPhysSimpleReadGCPtr(pVM, pvDst, GCVirtSrc, cb); … … 2143 2197 if (!VM_IS_EMT(pVM)) 2144 2198 return VERR_ACCESS_DENIED; 2199 #if defined(VBOX_STRICT) && defined(PDM_DEVHLP_DEADLOCK_DETECTION) 2200 /** @todo SMP. */ 2201 #endif 2145 2202 2146 2203 int rc = PGMPhysSimpleWriteGCPtr(pVM, GCVirtDst, pvSrc, cb); … … 2163 2220 if (!VM_IS_EMT(pVM)) 2164 2221 return VERR_ACCESS_DENIED; 2222 #if defined(VBOX_STRICT) && defined(PDM_DEVHLP_DEADLOCK_DETECTION) 2223 /** @todo SMP. */ 2224 #endif 2165 2225 2166 2226 int rc = PGMPhysGCPtr2GCPhys(pVM, GCPtr, pGCPhys);
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器