Changeset 37466 in vbox for trunk/src/VBox/Devices/Serial
- Timestamp:
- Jun 15, 2011 12:44:16 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 72280
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Serial/DevSerial.cpp
r37324 r37466 1190 1190 1191 1191 /* 1192 * We have a critical section make TM and IOM take it for callbacks.1193 */1194 pDevIns->pCritSectR3 = &pThis->CritSect;1195 1196 /*1197 1192 * Validate and read the configuration. 1198 1193 */ … … 1270 1265 1271 1266 /* 1272 * Initialize critical section and the semaphore. 1273 * This must of be done before attaching drivers or doing anything else 1274 * which can call us back. 1267 * Initialize critical section and the semaphore. Change the default 1268 * critical section to ours so that TM and IOM will enter it before 1269 * calling us. 1270 * 1271 * Note! This must of be done BEFORE creating timers, registering I/O ports 1272 * and other things which might pick up the default CS or end up 1273 * calling back into the device. 1275 1274 */ 1276 rc = PDMDevHlpCritSectInit(pDevIns, &pThis->CritSect, RT_SRC_POS, "Serial#%d", iInstance); 1277 if (RT_FAILURE(rc)) 1278 return rc; 1275 rc = PDMDevHlpCritSectInit(pDevIns, &pThis->CritSect, RT_SRC_POS, "Serial#%u", iInstance); 1276 AssertRCReturn(rc, rc); 1277 1278 rc = PDMDevHlpSetDeviceCritSect(pDevIns, &pThis->CritSect); 1279 AssertRCReturn(rc, rc); 1279 1280 1280 1281 rc = RTSemEventCreate(&pThis->ReceiveSem); 1281 1282 AssertRCReturn(rc, rc); 1282 1283 1284 /* 1285 * Create the timers. 1286 */ 1283 1287 rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_VIRTUAL, serialFifoTimer, pThis, 1284 1288 TMTIMER_FLAGS_DEFAULT_CRIT_SECT, "Serial Fifo Timer",
Note:
See TracChangeset
for help on using the changeset viewer.