Changeset 82419 in vbox for trunk/src/VBox
- Timestamp:
- Dec 5, 2019 1:39:50 PM (5 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp
r82417 r82419 52 52 Assert(!(pPeriod->fStatus & HDASTREAMPERIOD_F_VALID)); 53 53 54 # ifdef HDA_STREAM_PERIOD_WITH_LOCKING 54 55 int rc = RTCritSectInit(&pPeriod->CritSect); 55 56 AssertRCReturnStmt(rc, pPeriod->fStatus = 0, rc); 57 # endif 56 58 pPeriod->fStatus = HDASTREAMPERIOD_F_VALID; 57 59 … … 68 70 if (pPeriod->fStatus & HDASTREAMPERIOD_F_VALID) 69 71 { 72 # ifdef HDA_STREAM_PERIOD_WITH_LOCKING 70 73 RTCritSectDelete(&pPeriod->CritSect); 71 74 # endif 72 75 pPeriod->fStatus = HDASTREAMPERIOD_F_NONE; 73 76 } … … 229 232 int hdaR3StreamPeriodLock(PHDASTREAMPERIOD pPeriod) 230 233 { 234 # ifdef HDA_STREAM_PERIOD_WITH_LOCKING 231 235 int rc = RTCritSectEnter(&pPeriod->CritSect); 232 236 AssertRC(rc); 233 237 return rc; 238 # else 239 RT_NOREF(pPeriod); 240 return VINF_SUCCESS; 241 # endif 234 242 } 235 243 … … 241 249 void hdaR3StreamPeriodUnlock(PHDASTREAMPERIOD pPeriod) 242 250 { 251 # ifdef HDA_STREAM_PERIOD_WITH_LOCKING 243 252 int rc2 = RTCritSectLeave(&pPeriod->CritSect); 244 253 AssertRC(rc2); 254 # else 255 RT_NOREF(pPeriod); 256 # endif 245 257 } 246 258 -
trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h
r82417 r82419 54 54 typedef struct HDASTREAMPERIOD 55 55 { 56 #ifdef HDA_STREAM_PERIOD_WITH_LOCKING 56 57 /** Critical section for serializing access. 57 58 * @todo r=bird: This is not needed. The stream lock is held the two places 58 59 * this critsect is entered. */ 59 60 RTCRITSECT CritSect; 61 #endif 60 62 /** Associated HDA stream descriptor (SD) number. */ 61 63 uint8_t u8SD;
Note:
See TracChangeset
for help on using the changeset viewer.