Changeset 30646 in vbox for trunk/src/VBox/Additions/common/VBoxService
- Timestamp:
- Jul 6, 2010 8:00:31 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp
r30601 r30646 85 85 86 86 87 static DECLCALLBACK(int) VBoxServicePageSharingEmptyTreeCallback(PAVLPVNODECORE pNode, void * );87 static DECLCALLBACK(int) VBoxServicePageSharingEmptyTreeCallback(PAVLPVNODECORE pNode, void *pvUser); 88 88 89 89 static PAVLPVNODECORE pKnownModuleTree = NULL; … … 487 487 488 488 /* Check all registered modules. */ 489 VbglR3CheckSharedModules(); 490 491 /* Activate new module tree. */ 492 pKnownModuleTree = pNewTree; 489 int rc = VbglR3CheckSharedModules(); 490 if (rc == VINF_PGM_SHARED_MODULE_NONE_REGISTERED) 491 { 492 bool fUnregister = false; 493 /* The VM was restored, so reregister all modules the next time. */ 494 RTAvlPVDestroy(&pKnownModuleTree, VBoxServicePageSharingEmptyTreeCallback, &fUnregister); 495 pKnownModuleTree = NULL; 496 } 497 else 498 { 499 /* Activate new module tree. */ 500 pKnownModuleTree = pNewTree; 501 } 493 502 } 494 503 … … 496 505 * RTAvlPVDestroy callback. 497 506 */ 498 static DECLCALLBACK(int) VBoxServicePageSharingEmptyTreeCallback(PAVLPVNODECORE pNode, void * )507 static DECLCALLBACK(int) VBoxServicePageSharingEmptyTreeCallback(PAVLPVNODECORE pNode, void *pvUser) 499 508 { 500 509 PKNOWN_MODULE pModule = (PKNOWN_MODULE)pNode; 510 bool *pfUnregister = (bool *)pvUser; 501 511 502 512 VBoxServiceVerbose(3, "VBoxServicePageSharingEmptyTreeCallback %s %s\n", pModule->Info.szModule, pModule->szFileVersion); 503 513 504 /* Defererence module in the hypervisor. */ 505 int rc = VbglR3UnregisterSharedModule(pModule->Info.szModule, pModule->szFileVersion, (RTGCPTR64)pModule->Info.modBaseAddr, pModule->Info.modBaseSize); 506 AssertRC(rc); 514 /* Dereference module in the hypervisor. */ 515 if ( !pfUnregister 516 || *pfUnregister == true) 517 { 518 #ifdef RT_ARCH_X86 519 int rc = VbglR3UnregisterSharedModule(pModule->Info.szModule, pModule->szFileVersion, (RTGCPTR32)pModule->Info.modBaseAddr, pModule->Info.modBaseSize); 520 #else 521 int rc = VbglR3UnregisterSharedModule(pModule->Info.szModule, pModule->szFileVersion, (RTGCPTR64)pModule->Info.modBaseAddr, pModule->Info.modBaseSize); 522 #endif 523 AssertRC(rc); 524 } 507 525 508 526 if (pModule->hModule)
Note:
See TracChangeset
for help on using the changeset viewer.