- Timestamp:
- Jun 24, 2009 11:04:15 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r20729 r20885 2877 2877 AssertComRCReturn (autoCaller.rc(), VERR_ACCESS_DENIED); 2878 2878 2879 /*2880 * Locking the object before doing VMR3* calls is quite safe here, since2881 * we're on EMT. Write lock is necessary because we indirectly modify the2882 * meDVDState/meFloppyState members (pointed to by peState).2883 */2884 AutoWriteLock alock (pThis);2885 2886 2879 /* protect mpVM */ 2887 2880 AutoVMCaller autoVMCaller (pThis); … … 2925 2918 int rc = VINF_SUCCESS; 2926 2919 int rcRet = VINF_SUCCESS; 2920 2921 /* 2922 In general locking the object before doing VMR3* calls is quite safe 2923 here, since we're on EMT. Anyway we lock for write after eventually 2924 suspending the vm. The reason is that in the vmstateChangeCallback the 2925 var mVMStateChangeCallbackDisabled is checked under a lock also, which 2926 can lead to an dead lock. The write lock is necessary because we 2927 indirectly modify the meDVDState/meFloppyState members (pointed to by 2928 peState). 2929 */ 2930 AutoWriteLock alock (pThis); 2927 2931 2928 2932 do … … 3128 3132 } 3129 3133 while (0); 3134 3135 /* 3136 Unlock before resuming because the vmstateChangeCallback problem 3137 described above. 3138 */ 3139 alock.unlock(); 3130 3140 3131 3141 /*
Note:
See TracChangeset
for help on using the changeset viewer.