kernelbase: Avoid calling some kernel32 functions.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-12-11 21:53:09 +01:00
parent 7157160865
commit a3b8e944e6
2 changed files with 7 additions and 7 deletions

View File

@ -2687,10 +2687,10 @@ static LONG load_mui_string(const WCHAR *file_name, UINT res_id, WCHAR *buffer,
return ERROR_NOT_ENOUGH_MEMORY;
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);
if (!size) {
LeaveCriticalSection(&reg_mui_cs);
RtlLeaveCriticalSection(&reg_mui_cs);
/* Load the file */
hModule = LoadLibraryExW(full_name, NULL,
@ -2705,9 +2705,9 @@ static LONG load_mui_string(const WCHAR *file_name, UINT res_id, WCHAR *buffer,
goto cleanup;
}
EnterCriticalSection(&reg_mui_cs);
RtlEnterCriticalSection(&reg_mui_cs);
reg_mui_cache_put(full_name, res_id, string, size);
LeaveCriticalSection(&reg_mui_cs);
RtlLeaveCriticalSection(&reg_mui_cs);
}
*req_chars = size + 1;
@ -2739,7 +2739,7 @@ cleanup:
if (hModule)
FreeLibrary(hModule);
else
LeaveCriticalSection(&reg_mui_cs);
RtlLeaveCriticalSection(&reg_mui_cs);
heap_free(full_name);
return result;
}

View File

@ -866,7 +866,7 @@ static void CDECL start_fiber(void)
__TRY
{
start( fiber->param );
ExitThread( 1 );
RtlExitUserThread( 1 );
}
__EXCEPT(UnhandledExceptionFilter)
{
@ -996,7 +996,7 @@ void WINAPI DECLSPEC_HOTPATCH DeleteFiber( LPVOID fiber_ptr )
if (fiber == NtCurrentTeb()->Tib.u.FiberData)
{
HeapFree( GetProcessHeap(), 0, fiber );
ExitThread(1);
RtlExitUserThread( 1 );
}
RtlFreeUserStack( fiber->stack_allocation );
HeapFree( GetProcessHeap(), 0, fiber->fls_slots );