Author: akhaldi
Date: Wed Mar 5 11:45:39 2014
New Revision: 62425
URL:
http://svn.reactos.org/svn/reactos?rev=62425&view=rev
Log:
[KERNEL32]
* Mark as hotpatchable.
CORE-7959
Modified:
trunk/reactos/dll/win32/kernel32/CMakeLists.txt
trunk/reactos/dll/win32/kernel32/client/loader.c
trunk/reactos/dll/win32/kernel32/client/proc.c
trunk/reactos/dll/win32/kernel32/client/synch.c
trunk/reactos/dll/win32/kernel32/client/thread.c
Modified: trunk/reactos/dll/win32/kernel32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/CMakeLi…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] Wed Mar 5 11:45:39 2014
@@ -99,7 +99,7 @@
kernel32.rc
${CMAKE_CURRENT_BINARY_DIR}/kernel32.def)
-set_module_type(kernel32 win32dll ENTRYPOINT DllMain 12)
+set_module_type(kernel32 win32dll HOTPATCHABLE ENTRYPOINT DllMain 12)
#############################################
## HACK FOR MSVC COMPILATION WITH win32dll ##
set_subsystem(kernel32 console)
Modified: trunk/reactos/dll/win32/kernel32/client/loader.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/loader.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/loader.c [iso-8859-1] Wed Mar 5 11:45:39
2014
@@ -107,6 +107,7 @@
*/
HINSTANCE
WINAPI
+DECLSPEC_HOTPATCH
LoadLibraryA(LPCSTR lpLibFileName)
{
LPSTR PathBuffer;
@@ -152,6 +153,7 @@
*/
HINSTANCE
WINAPI
+DECLSPEC_HOTPATCH
LoadLibraryExA(LPCSTR lpLibFileName,
HANDLE hFile,
DWORD dwFlags)
@@ -171,6 +173,7 @@
*/
HINSTANCE
WINAPI
+DECLSPEC_HOTPATCH
LoadLibraryW(LPCWSTR lpLibFileName)
{
/* Call Ex version of the API */
@@ -279,6 +282,7 @@
*/
HINSTANCE
WINAPI
+DECLSPEC_HOTPATCH
LoadLibraryExW(LPCWSTR lpLibFileName,
HANDLE hFile,
DWORD dwFlags)
@@ -447,7 +451,10 @@
/*
* @implemented
*/
-BOOL WINAPI FreeLibrary(HINSTANCE hLibModule)
+BOOL
+WINAPI
+DECLSPEC_HOTPATCH
+FreeLibrary(HINSTANCE hLibModule)
{
NTSTATUS Status;
PIMAGE_NT_HEADERS NtHeaders;
@@ -806,6 +813,7 @@
*/
HMODULE
WINAPI
+DECLSPEC_HOTPATCH
GetModuleHandleA(LPCSTR lpModuleName)
{
PUNICODE_STRING ModuleNameW;
Modified: trunk/reactos/dll/win32/kernel32/client/proc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/proc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/proc.c [iso-8859-1] Wed Mar 5 11:45:39 2014
@@ -4605,6 +4605,7 @@
*/
BOOL
WINAPI
+DECLSPEC_HOTPATCH
CreateProcessW(LPCWSTR lpApplicationName,
LPWSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
@@ -4773,6 +4774,7 @@
*/
BOOL
WINAPI
+DECLSPEC_HOTPATCH
CreateProcessA(LPCSTR lpApplicationName,
LPSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
Modified: trunk/reactos/dll/win32/kernel32/client/synch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/synch.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/synch.c [iso-8859-1] Wed Mar 5 11:45:39 2014
@@ -426,6 +426,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
CreateSemaphoreA(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL,
IN LONG lInitialCount,
IN LONG lMaximumCount,
@@ -439,6 +440,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
CreateSemaphoreW(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL,
IN LONG lInitialCount,
IN LONG lMaximumCount,
@@ -456,6 +458,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
OpenSemaphoreA(IN DWORD dwDesiredAccess,
IN BOOL bInheritHandle,
IN LPCSTR lpName)
@@ -468,6 +471,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
OpenSemaphoreW(IN DWORD dwDesiredAccess,
IN BOOL bInheritHandle,
IN LPCWSTR lpName)
@@ -480,6 +484,7 @@
*/
BOOL
WINAPI
+DECLSPEC_HOTPATCH
ReleaseSemaphore(IN HANDLE hSemaphore,
IN LONG lReleaseCount,
IN LPLONG lpPreviousCount)
@@ -500,6 +505,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
CreateMutexA(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL,
IN BOOL bInitialOwner,
IN LPCSTR lpName OPTIONAL)
@@ -512,6 +518,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL,
IN BOOL bInitialOwner,
IN LPCWSTR lpName OPTIONAL)
@@ -527,6 +534,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
OpenMutexA(IN DWORD dwDesiredAccess,
IN BOOL bInheritHandle,
IN LPCSTR lpName)
@@ -539,6 +547,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
OpenMutexW(IN DWORD dwDesiredAccess,
IN BOOL bInheritHandle,
IN LPCWSTR lpName)
@@ -551,6 +560,7 @@
*/
BOOL
WINAPI
+DECLSPEC_HOTPATCH
ReleaseMutex(IN HANDLE hMutex)
{
NTSTATUS Status;
@@ -569,6 +579,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL,
IN BOOL bManualReset,
IN BOOL bInitialState,
@@ -582,6 +593,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL,
IN BOOL bManualReset,
IN BOOL bInitialState,
@@ -599,6 +611,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
OpenEventA(IN DWORD dwDesiredAccess,
IN BOOL bInheritHandle,
IN LPCSTR lpName)
@@ -611,6 +624,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
OpenEventW(IN DWORD dwDesiredAccess,
IN BOOL bInheritHandle,
IN LPCWSTR lpName)
@@ -623,6 +637,7 @@
*/
BOOL
WINAPI
+DECLSPEC_HOTPATCH
PulseEvent(IN HANDLE hEvent)
{
NTSTATUS Status;
@@ -641,6 +656,7 @@
*/
BOOL
WINAPI
+DECLSPEC_HOTPATCH
ResetEvent(IN HANDLE hEvent)
{
NTSTATUS Status;
@@ -659,6 +675,7 @@
*/
BOOL
WINAPI
+DECLSPEC_HOTPATCH
SetEvent(IN HANDLE hEvent)
{
NTSTATUS Status;
@@ -715,6 +732,7 @@
*/
VOID
WINAPI
+DECLSPEC_HOTPATCH
Sleep(IN DWORD dwMilliseconds)
{
/* Call the new API */
Modified: trunk/reactos/dll/win32/kernel32/client/thread.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/thread.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/thread.c [iso-8859-1] Wed Mar 5 11:45:39
2014
@@ -131,6 +131,7 @@
*/
HANDLE
WINAPI
+DECLSPEC_HOTPATCH
CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes,
IN DWORD dwStackSize,
IN LPTHREAD_START_ROUTINE lpStartAddress,