Changeset 8823 in vbox for trunk/src/VBox/VMM/DBGF.cpp
- Timestamp:
- May 14, 2008 9:51:07 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30830
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/DBGF.cpp
r8797 r8823 159 159 && pVM->dbgf.s.PingPong.enmSpeaker == RTPINGPONGSPEAKER_PONG) 160 160 { 161 do rc = RTSemPingWait(&pVM->dbgf.s.PingPong, 5000); 162 while (pVM->dbgf.s.fAttached); 161 RTThreadSleep(32); /* Don't want that assertion if we can help it. */ 162 while ( pVM->dbgf.s.fAttached 163 && pVM->dbgf.s.PingPong.enmSpeaker == RTPINGPONGSPEAKER_PONG) 164 if (RTSemPingWait(&pVM->dbgf.s.PingPong, 5000) != VERR_TIMEOUT) 165 break; 163 166 } 164 167 … … 827 830 DBGFR3DECL(int) DBGFR3Detach(PVM pVM) 828 831 { 832 LogFlowFunc(("\n")); 833 829 834 /* 830 835 * Check if attached. … … 839 844 * Send detach command. 840 845 */ 846 DBGFCMD enmCmd; 841 847 if (pVM->dbgf.s.PingPong.enmSpeaker == RTPINGPONGSPEAKER_PONG) 842 848 { 843 dbgfr3SetCmd(pVM, DBGFCMD_DETACH_DEBUGGER);849 enmCmd = dbgfr3SetCmd(pVM, DBGFCMD_DETACH_DEBUGGER); 844 850 int rc = RTSemPong(&pVM->dbgf.s.PingPong); 845 851 if (VBOX_FAILURE(rc)) … … 848 854 return rc; 849 855 } 856 LogFunc(("enmCmd=%d (pong -> ping)\n", enmCmd)); 850 857 } 851 858 else 852 dbgfr3SetCmd(pVM, DBGFCMD_DETACH_DEBUGGER); 859 { 860 enmCmd = dbgfr3SetCmd(pVM, DBGFCMD_DETACH_DEBUGGER); 861 LogFunc(("enmCmd=%d (ping)\n", enmCmd)); 862 } 853 863 854 864 /* … … 866 876 * Destroy the ping-pong construct and return. 867 877 */ 868 pVM->dbgf.s.fAttached = false;878 ASMAtomicWriteBool(&pVM->dbgf.s.fAttached, false); 869 879 RTThreadSleep(10); 870 880 rc = RTSemPingPongDestroy(&pVM->dbgf.s.PingPong); 871 881 AssertRC(rc); 872 882 883 LogFlowFunc(("returns VINF_SUCCESS\n")); 873 884 return VINF_SUCCESS; 874 885 }
Note:
See TracChangeset
for help on using the changeset viewer.