Changeset 7992 in vbox for trunk/src/VBox/Main/ConsoleImpl.cpp
- Timestamp:
- Apr 15, 2008 1:53:12 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 29646
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r7939 r7992 2491 2491 2492 2492 /** 2493 * 2494 * 2495 * @note Locks this object for reading.2493 * Called by IInternalSessionControl::OnDVDDriveChange(). 2494 * 2495 * @note Locks this object for writing. 2496 2496 */ 2497 2497 HRESULT Console::onDVDDriveChange() … … 2502 2502 AssertComRCReturnRC (autoCaller.rc()); 2503 2503 2504 AutoReaderLock alock (this); 2504 /* doDriveChange() needs a write lock */ 2505 AutoLock alock (this); 2505 2506 2506 2507 /* Ignore callbacks when there's no VM around */ … … 2587 2588 2588 2589 /** 2589 * 2590 * 2591 * @note Locks this object for reading.2590 * Called by IInternalSessionControl::OnFloppyDriveChange(). 2591 * 2592 * @note Locks this object for writing. 2592 2593 */ 2593 2594 HRESULT Console::onFloppyDriveChange() … … 2598 2599 AssertComRCReturnRC (autoCaller.rc()); 2599 2600 2600 AutoReaderLock alock (this); 2601 /* doDriveChange() needs a write lock */ 2602 AutoLock alock (this); 2601 2603 2602 2604 /* Ignore callbacks when there's no VM around */ … … 2704 2706 * @param fPassthrough Enables using passthrough mode of the host DVD drive if applicable. 2705 2707 * 2706 * @note Locks this object for reading.2708 * @note Locks this object for writing. 2707 2709 */ 2708 2710 HRESULT Console::doDriveChange (const char *pszDevice, unsigned uInstance, unsigned uLun, DriveState_T eState, … … 2717 2719 AssertComRCReturnRC (autoCaller.rc()); 2718 2720 2719 AutoReaderLock alock (this); 2721 /* We will need to release the write lock before calling EMT */ 2722 AutoLock alock (this); 2720 2723 2721 2724 /* protect mpVM */ … … 2784 2787 * 2785 2788 * @thread EMT 2786 * @note Locks the Console object for writing 2789 * @note Locks the Console object for writing. 2787 2790 */ 2788 2791 DECLCALLBACK(int) Console::changeDrive (Console *pThis, const char *pszDevice, unsigned uInstance, unsigned uLun, … … 2805 2808 2806 2809 /* 2807 * Locking the object before doing VMR3* calls is quite safe here,2808 * since we're on EMT. Write lock is necessary because we're indirectly2809 * modify themeDVDState/meFloppyState members (pointed to by peState).2810 * Locking the object before doing VMR3* calls is quite safe here, since 2811 * we're on EMT. Write lock is necessary because we indirectly modify the 2812 * meDVDState/meFloppyState members (pointed to by peState). 2810 2813 */ 2811 2814 AutoLock alock (pThis);
Note:
See TracChangeset
for help on using the changeset viewer.