Commit a3b8e944 authored by Alexandre Julliard's avatar Alexandre Julliard

kernelbase: Avoid calling some kernel32 functions.

parent 71571608
...@@ -2687,10 +2687,10 @@ static LONG load_mui_string(const WCHAR *file_name, UINT res_id, WCHAR *buffer, ...@@ -2687,10 +2687,10 @@ static LONG load_mui_string(const WCHAR *file_name, UINT res_id, WCHAR *buffer,
return ERROR_NOT_ENOUGH_MEMORY; return ERROR_NOT_ENOUGH_MEMORY;
GetFullPathNameW(file_name, size, full_name, NULL); GetFullPathNameW(file_name, size, full_name, NULL);
EnterCriticalSection(&reg_mui_cs); RtlEnterCriticalSection(&reg_mui_cs);
size = reg_mui_cache_get(full_name, res_id, &string); size = reg_mui_cache_get(full_name, res_id, &string);
if (!size) { if (!size) {
LeaveCriticalSection(&reg_mui_cs); RtlLeaveCriticalSection(&reg_mui_cs);
/* Load the file */ /* Load the file */
hModule = LoadLibraryExW(full_name, NULL, hModule = LoadLibraryExW(full_name, NULL,
...@@ -2705,9 +2705,9 @@ static LONG load_mui_string(const WCHAR *file_name, UINT res_id, WCHAR *buffer, ...@@ -2705,9 +2705,9 @@ static LONG load_mui_string(const WCHAR *file_name, UINT res_id, WCHAR *buffer,
goto cleanup; goto cleanup;
} }
EnterCriticalSection(&reg_mui_cs); RtlEnterCriticalSection(&reg_mui_cs);
reg_mui_cache_put(full_name, res_id, string, size); reg_mui_cache_put(full_name, res_id, string, size);
LeaveCriticalSection(&reg_mui_cs); RtlLeaveCriticalSection(&reg_mui_cs);
} }
*req_chars = size + 1; *req_chars = size + 1;
...@@ -2739,7 +2739,7 @@ cleanup: ...@@ -2739,7 +2739,7 @@ cleanup:
if (hModule) if (hModule)
FreeLibrary(hModule); FreeLibrary(hModule);
else else
LeaveCriticalSection(&reg_mui_cs); RtlLeaveCriticalSection(&reg_mui_cs);
heap_free(full_name); heap_free(full_name);
return result; return result;
} }
......
...@@ -866,7 +866,7 @@ static void CDECL start_fiber(void) ...@@ -866,7 +866,7 @@ static void CDECL start_fiber(void)
__TRY __TRY
{ {
start( fiber->param ); start( fiber->param );
ExitThread( 1 ); RtlExitUserThread( 1 );
} }
__EXCEPT(UnhandledExceptionFilter) __EXCEPT(UnhandledExceptionFilter)
{ {
...@@ -996,7 +996,7 @@ void WINAPI DECLSPEC_HOTPATCH DeleteFiber( LPVOID fiber_ptr ) ...@@ -996,7 +996,7 @@ void WINAPI DECLSPEC_HOTPATCH DeleteFiber( LPVOID fiber_ptr )
if (fiber == NtCurrentTeb()->Tib.u.FiberData) if (fiber == NtCurrentTeb()->Tib.u.FiberData)
{ {
HeapFree( GetProcessHeap(), 0, fiber ); HeapFree( GetProcessHeap(), 0, fiber );
ExitThread(1); RtlExitUserThread( 1 );
} }
RtlFreeUserStack( fiber->stack_allocation ); RtlFreeUserStack( fiber->stack_allocation );
HeapFree( GetProcessHeap(), 0, fiber->fls_slots ); HeapFree( GetProcessHeap(), 0, fiber->fls_slots );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment