Author: ekohl
Date: Sun Oct 12 17:13:36 2014
New Revision: 64700
URL: http://svn.reactos.org/svn/reactos?rev=64700&view=rev
Log:
[SETUPAPI]
Store the module handles to loaded property page provider dlls in the DeviceInfoData (for class property pages) or in the DeviceInfo (for device property pages). The dlls are unloaded when the device info set is destroyed. These dlls were unloaded as soon as the property sheet data had been retrieved. These property pages could not be added to a property sheet because unloading the dll invalidated the page reources.
Modified:
trunk/reactos/dll/win32/setupapi/devclass.c
trunk/reactos/dll/win32/setupapi/devinst.c
trunk/reactos/dll/win32/setupapi/setupapi_private.h
Modified: trunk/reactos/dll/win32/setupapi/devclass.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devclas…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/devclass.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/devclass.c [iso-8859-1] Sun Oct 12 17:13:36 2014
@@ -1269,6 +1269,19 @@
goto cleanup;
}
+ if (DeviceInfoData)
+ {
+ struct DeviceInfo *devInfo = (struct DeviceInfo *)DeviceInfoData->Reserved;
+ devInfo->hmodDevicePropPageProvider = hModule;
+ devInfo->pDevicePropPageProvider = pPropPageProvider;
+ }
+ else
+ {
+ struct DeviceInfoSet *devInfoSet = (struct DeviceInfoSet *)DeviceInfoSet;
+ devInfoSet->hmodClassPropPageProvider = hModule;
+ devInfoSet->pClassPropPageProvider = pPropPageProvider;
+ }
+
InitialNumberOfPages = PropertySheetHeader->nPages;
Request.cbSize = sizeof(SP_PROPSHEETPAGE_REQUEST);
@@ -1299,7 +1312,6 @@
if (hKey != INVALID_HANDLE_VALUE)
RegCloseKey(hKey);
HeapFree(GetProcessHeap(), 0, PropPageProvider);
- FreeFunctionPointer(hModule, pPropPageProvider);
}
TRACE("Returning %d\n", ret);
Modified: trunk/reactos/dll/win32/setupapi/devinst.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/devinst.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/devinst.c [iso-8859-1] Sun Oct 12 17:13:36 2014
@@ -602,6 +602,8 @@
return FALSE;
}
DestroyClassInstallParams(&deviceInfo->ClassInstallParams);
+ if (deviceInfo->hmodDevicePropPageProvider)
+ FreeLibrary(deviceInfo->hmodDevicePropPageProvider);
return HeapFree(GetProcessHeap(), 0, deviceInfo);
}
@@ -622,6 +624,8 @@
RegCloseKey(list->HKLM);
CM_Disconnect_Machine(list->hMachine);
DestroyClassInstallParams(&list->ClassInstallParams);
+ if (list->hmodClassPropPageProvider)
+ FreeLibrary(list->hmodClassPropPageProvider);
return HeapFree(GetProcessHeap(), 0, list);
}
Modified: trunk/reactos/dll/win32/setupapi/setupapi_private.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupap…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/setupapi_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/setupapi_private.h [iso-8859-1] Sun Oct 12 17:13:36 2014
@@ -172,6 +172,10 @@
/* Used by SetupDiGetClassInstallParamsW/SetupDiSetClassInstallParamsW */
struct ClassInstallParams ClassInstallParams;
+ /* Device property page provider data */
+ HMODULE hmodDevicePropPageProvider;
+ PVOID pDevicePropPageProvider;
+
/* Variable size array (contains data for instanceId, UniqueId, DeviceDescription) */
WCHAR Data[ANYSIZE_ARRAY];
};
@@ -199,6 +203,10 @@
/* Used by SetupDiGetClassInstallParamsW/SetupDiSetClassInstallParamsW */
struct ClassInstallParams ClassInstallParams;
+
+ /* Class property page provider data */
+ HMODULE hmodClassPropPageProvider;
+ PVOID pClassPropPageProvider;
/* Contains the name of the remote computer ('\\COMPUTERNAME' for example),
* or NULL if related to local machine. Points into szData field at the
Author: hbelusca
Date: Sun Oct 12 14:08:14 2014
New Revision: 64698
URL: http://svn.reactos.org/svn/reactos?rev=64698&view=rev
Log:
[FAST486]: speed up things a bit when we're reading prefixes, by really going to the next instruction (no jump to the end of the do{}while() loop, then restart).
Modified:
trunk/reactos/lib/fast486/fast486.c
Modified: trunk/reactos/lib/fast486/fast486.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/fast486.c?rev=…
==============================================================================
--- trunk/reactos/lib/fast486/fast486.c [iso-8859-1] (original)
+++ trunk/reactos/lib/fast486/fast486.c [iso-8859-1] Sun Oct 12 14:08:14 2014
@@ -54,6 +54,7 @@
/* Main execution loop */
do
{
+NextInst:
/* Check if this is a new instruction */
if (State->PrefixFlags == 0) State->SavedInstPtr = State->InstPtr;
@@ -72,7 +73,7 @@
CurrentHandler(State, Opcode);
/* If this is a prefix, go to the next instruction immediately */
- if (CurrentHandler == Fast486OpcodePrefix) continue;
+ if (CurrentHandler == Fast486OpcodePrefix) goto NextInst;
/* A non-prefix opcode has been executed, reset the prefix flags */
State->PrefixFlags = 0;
@@ -104,8 +105,7 @@
State->IntStatus = FAST486_INT_EXECUTE;
}
}
- while ((CurrentHandler == Fast486OpcodePrefix) ||
- (Command == FAST486_CONTINUE) ||
+ while ((Command == FAST486_CONTINUE) ||
(Command == FAST486_STEP_OVER && ProcedureCallCount > 0) ||
(Command == FAST486_STEP_OUT && ProcedureCallCount >= 0));
}
Author: tkreuzer
Date: Sun Oct 12 14:05:49 2014
New Revision: 64697
URL: http://svn.reactos.org/svn/reactos?rev=64697&view=rev
Log:
[NTOSKRNL]
Make sure APCs are disabled when acquiring MmSectionCommitMutex.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/section.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/section.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/section.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] Sun Oct 12 14:05:49 2014
@@ -1391,7 +1391,7 @@
TempPte = Segment->SegmentPteTemplate;
/* Acquire the commit lock and loop all prototype PTEs to be committed */
- KeAcquireGuardedMutexUnsafe(&MmSectionCommitMutex);
+ KeAcquireGuardedMutex(&MmSectionCommitMutex);
while (PointerPte < LastPte)
{
/* Make sure the PTE is already invalid */
@@ -1417,7 +1417,7 @@
ASSERT(Segment->NumberOfCommittedPages <= Segment->TotalNumberOfPtes);
/* Now that we're done, release the lock */
- KeReleaseGuardedMutexUnsafe(&MmSectionCommitMutex);
+ KeReleaseGuardedMutex(&MmSectionCommitMutex);
}
/* Is it SEC_BASED, or did the caller manually specify an address? */