Changeset 93991 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Feb 28, 2022 4:29:55 PM (3 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PDM.cpp
r93901 r93991 888 888 889 889 /* 890 * Cleanup any leftover queues. 891 */ 892 pdmR3QueueTerm(pVM); 893 894 /* 890 895 * Destroy the PDM lock. 891 896 */ -
trunk/src/VBox/VMM/VMMR3/PDMQueue.cpp
r93900 r93991 433 433 hQueue--; 434 434 pVM->pdm.s.cRing3Queues = hQueue; 435 /** @todo this should be done by PDMR3Term not here. */436 if (!hQueue)437 {438 pVM->pdm.s.cRing3QueuesAlloc = 0;439 PPDMQUEUE *papQueuesOld = ASMAtomicXchgPtrT(&pVM->pdm.s.papRing3Queues, NULL, PPDMQUEUE *);440 RTMemFree(papQueuesOld);441 }442 435 } 443 436 pQueue->u32Magic = PDMQUEUE_MAGIC_DEAD; … … 801 794 } 802 795 796 797 /** 798 * Terminate the queues, freeing any resources still allocated. 799 * 800 * @returns nothing. 801 * @param pVM The cross-context VM structure. 802 */ 803 DECLHIDDEN(void) pdmR3QueueTerm(PVM pVM) 804 { 805 if (pVM->pdm.s.papRing3Queues) 806 { 807 /* 808 * Free the R3 queue handle array. 809 */ 810 PDMQUEUEHANDLE cQueues = pVM->pdm.s.cRing3Queues; 811 for (PDMQUEUEHANDLE i = 0; i < cQueues; i++) 812 if (pVM->pdm.s.papRing3Queues[i]) 813 { 814 PPDMQUEUE pQueue = pVM->pdm.s.papRing3Queues[i]; 815 816 PDMR3QueueDestroy(pVM, RT_ELEMENTS(pVM->pdm.s.apRing0Queues) + i, pQueue->u.Gen.pvOwner); 817 Assert(!pVM->pdm.s.papRing3Queues[i]); 818 } 819 820 RTMemFree(pVM->pdm.s.papRing3Queues); 821 pVM->pdm.s.cRing3QueuesAlloc = 0; 822 pVM->pdm.s.papRing3Queues = NULL; 823 } 824 } -
trunk/src/VBox/VMM/include/PDMInternal.h
r93635 r93991 1809 1809 void pdmR3BlkCacheTerm(PVM pVM); 1810 1810 int pdmR3BlkCacheResume(PVM pVM); 1811 1812 DECLHIDDEN(void) pdmR3QueueTerm(PVM pVM); 1811 1813 #endif /* IN_RING3 */ 1812 1814
Note:
See TracChangeset
for help on using the changeset viewer.