Changeset 40806 in vbox for trunk/src/VBox/HostDrivers/VBoxPci
- Timestamp:
- Apr 6, 2012 9:05:19 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77321
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxPci/VBoxPci.c
r37423 r40806 74 74 return NULL; 75 75 } 76 DECLINLINE(int) vboxPciDevLock(PVBOXRAWPCIINS pThis, 77 PRTSPINLOCKTMP pTmp) 76 DECLINLINE(int) vboxPciDevLock(PVBOXRAWPCIINS pThis) 78 77 { 79 78 #ifdef VBOX_WITH_SHARED_PCI_INTERRUPTS 80 RTSpinlockAcquire NoInts(pThis->hSpinlock, pTmp);79 RTSpinlockAcquire(pThis->hSpinlock); 81 80 return VINF_SUCCESS; 82 81 #else … … 89 88 } 90 89 91 DECLINLINE(void) vboxPciDevUnlock(PVBOXRAWPCIINS pThis, 92 PRTSPINLOCKTMP pTmp) 90 DECLINLINE(void) vboxPciDevUnlock(PVBOXRAWPCIINS pThis) 93 91 { 94 92 #ifdef VBOX_WITH_SHARED_PCI_INTERRUPTS 95 RTSpinlockReleaseNoInts(pThis->hSpinlock , pTmp);93 RTSpinlockReleaseNoInts(pThis->hSpinlock); 96 94 #else 97 95 NOREF(pTmp); … … 184 182 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 185 183 int rc; 186 RTSPINLOCKTMP aTmp; 187 188 vboxPciDevLock(pThis, &aTmp); 184 185 vboxPciDevLock(pThis); 189 186 190 187 rc = vboxPciOsDevInit(pThis, fFlags); 191 188 192 vboxPciDevUnlock(pThis , &aTmp);189 vboxPciDevUnlock(pThis); 193 190 194 191 return rc; … … 202 199 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 203 200 int rc; 204 RTSPINLOCKTMP aTmp; 205 206 vboxPciDevLock(pThis, &aTmp); 201 202 vboxPciDevLock(pThis); 207 203 208 204 if (pThis->IrqHandler.pfnIrqHandler) … … 215 211 rc = vboxPciOsDevDeinit(pThis, fFlags); 216 212 217 vboxPciDevUnlock(pThis , &aTmp);213 vboxPciDevUnlock(pThis); 218 214 219 215 return rc; … … 265 261 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 266 262 int rc; 267 RTSPINLOCKTMP aTmp; 268 269 vboxPciDevLock(pThis, &aTmp); 263 264 vboxPciDevLock(pThis); 270 265 271 266 rc = vboxPciOsDevGetRegionInfo(pThis, iRegion, 272 267 pRegionStart, pu64RegionSize, 273 268 pfPresent, pfFlags); 274 vboxPciDevUnlock(pThis , &aTmp);269 vboxPciDevUnlock(pThis); 275 270 276 271 return rc; … … 289 284 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 290 285 int rc; 291 RTSPINLOCKTMP aTmp; 292 293 vboxPciDevLock(pThis, &aTmp); 286 287 vboxPciDevLock(pThis); 294 288 295 289 rc = vboxPciOsDevMapRegion(pThis, iRegion, RegionStart, u64RegionSize, fFlags, pRegionBase); 296 290 297 vboxPciDevUnlock(pThis , &aTmp);291 vboxPciDevUnlock(pThis); 298 292 299 293 return rc; … … 311 305 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 312 306 int rc; 313 RTSPINLOCKTMP aTmp; 314 315 vboxPciDevLock(pThis, &aTmp); 307 308 vboxPciDevLock(pThis); 316 309 317 310 rc = vboxPciOsDevUnmapRegion(pThis, iRegion, RegionStart, u64RegionSize, RegionBase); 318 311 319 vboxPciDevUnlock(pThis , &aTmp);312 vboxPciDevUnlock(pThis); 320 313 321 314 return rc; … … 330 323 { 331 324 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 332 RTSPINLOCKTMP aTmp; 333 int rc; 334 335 vboxPciDevLock(pThis, &aTmp); 325 int rc; 326 327 vboxPciDevLock(pThis); 336 328 337 329 rc = vboxPciOsDevPciCfgRead(pThis, Register, pValue); 338 330 339 vboxPciDevUnlock(pThis , &aTmp);331 vboxPciDevUnlock(pThis); 340 332 341 333 return rc; … … 351 343 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 352 344 int rc; 353 RTSPINLOCKTMP aTmp; 354 355 vboxPciDevLock(pThis, &aTmp); 345 346 vboxPciDevLock(pThis); 356 347 357 348 rc = vboxPciOsDevPciCfgWrite(pThis, Register, pValue); 358 349 359 vboxPciDevUnlock(pThis , &aTmp);350 vboxPciDevUnlock(pThis); 360 351 361 352 return rc; … … 370 361 int rc; 371 362 int32_t iHostIrq = 0; 372 RTSPINLOCKTMP aTmp;373 363 374 364 if (pfnHandler == NULL) 375 365 return VERR_INVALID_PARAMETER; 376 366 377 vboxPciDevLock(pThis , &aTmp);367 vboxPciDevLock(pThis); 378 368 379 369 if (pThis->IrqHandler.pfnIrqHandler) … … 393 383 } 394 384 395 vboxPciDevUnlock(pThis , &aTmp);385 vboxPciDevUnlock(pThis); 396 386 397 387 return rc; … … 403 393 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 404 394 int rc; 405 RTSPINLOCKTMP aTmp;406 395 407 396 if (hIsr != 0xcafe0000) 408 397 return VERR_INVALID_PARAMETER; 409 398 410 vboxPciDevLock(pThis , &aTmp);399 vboxPciDevLock(pThis); 411 400 412 401 rc = vboxPciOsDevUnregisterIrqHandler(pThis, pThis->IrqHandler.iHostIrq); … … 417 406 pThis->IrqHandler.iHostIrq = 0; 418 407 } 419 vboxPciDevUnlock(pThis , &aTmp);408 vboxPciDevUnlock(pThis); 420 409 421 410 return rc; … … 428 417 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 429 418 int rc; 430 RTSPINLOCKTMP aTmp; 431 432 vboxPciDevLock(pThis, &aTmp); 419 420 vboxPciDevLock(pThis); 433 421 434 422 rc = vboxPciOsDevPowerStateChange(pThis, aState); … … 448 436 449 437 450 vboxPciDevUnlock(pThis , &aTmp);438 vboxPciDevUnlock(pThis); 451 439 452 440 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.