Changeset 40806 in vbox for trunk/src/VBox/HostDrivers/Support/darwin
- 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/Support/darwin/SUPDrv-darwin.cpp
r37970 r40806 239 239 */ 240 240 memset(g_apSessionHashTab, 0, sizeof(g_apSessionHashTab)); /* paranoia */ 241 rc = RTSpinlockCreate(&g_Spinlock );241 rc = RTSpinlockCreate(&g_Spinlock, RTSPINLOCK_FLAGS_INTERRUPT_SAFE, "VBoxDrvDarwin"); 242 242 if (RT_SUCCESS(rc)) 243 243 { … … 370 370 RTPROCESS Process = RTProcSelf(); 371 371 unsigned iHash = SESSION_HASH(Process); 372 RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER; 373 RTSpinlockAcquireNoInts(g_Spinlock, &Tmp); 372 RTSpinlockAcquire(g_Spinlock); 374 373 375 374 pSession = g_apSessionHashTab[iHash]; … … 393 392 rc = VERR_GENERAL_FAILURE; 394 393 395 RTSpinlockReleaseNoInts(g_Spinlock , &Tmp);394 RTSpinlockReleaseNoInts(g_Spinlock); 396 395 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 397 396 kauth_cred_unref(&pCred); … … 442 441 static int VBoxDrvDarwinIOCtl(dev_t Dev, u_long iCmd, caddr_t pData, int fFlags, struct proc *pProcess) 443 442 { 444 RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;445 443 const RTPROCESS Process = proc_pid(pProcess); 446 444 const unsigned iHash = SESSION_HASH(Process); … … 450 448 * Find the session. 451 449 */ 452 RTSpinlockAcquire NoInts(g_Spinlock, &Tmp);450 RTSpinlockAcquire(g_Spinlock); 453 451 pSession = g_apSessionHashTab[iHash]; 454 452 if (pSession && pSession->Process != Process) … … 457 455 while (pSession && pSession->Process != Process); 458 456 } 459 RTSpinlockReleaseNoInts(g_Spinlock , &Tmp);457 RTSpinlockReleaseNoInts(g_Spinlock); 460 458 if (!pSession) 461 459 { … … 982 980 */ 983 981 unsigned iHash = SESSION_HASH(m_pSession->Process); 984 RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER; 985 RTSpinlockAcquireNoInts(g_Spinlock, &Tmp); 982 RTSpinlockAcquire(g_Spinlock); 986 983 987 984 PSUPDRVSESSION pCur = g_apSessionHashTab[iHash]; … … 1002 999 rc = VERR_ALREADY_LOADED; 1003 1000 1004 RTSpinlockReleaseNoInts(g_Spinlock , &Tmp);1001 RTSpinlockReleaseNoInts(g_Spinlock); 1005 1002 if (RT_SUCCESS(rc)) 1006 1003 { … … 1034 1031 */ 1035 1032 const unsigned iHash = SESSION_HASH(Process); 1036 RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER; 1037 RTSpinlockAcquireNoInts(g_Spinlock, &Tmp); 1033 RTSpinlockAcquire(g_Spinlock); 1038 1034 PSUPDRVSESSION pSession = g_apSessionHashTab[iHash]; 1039 1035 if (pSession) … … 1065 1061 } 1066 1062 } 1067 RTSpinlockReleaseNoInts(g_Spinlock , &Tmp);1063 RTSpinlockReleaseNoInts(g_Spinlock); 1068 1064 if (!pSession) 1069 1065 {
Note:
See TracChangeset
for help on using the changeset viewer.