ntdll: Respect HEAP_NO_SERIALIZE flag in HeapLock / HeapUnlock.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2022-04-26 15:13:24 +02:00 committed by Alexandre Julliard
parent 005ed5773c
commit 1f490ec1a5
2 changed files with 2 additions and 4 deletions

View File

@ -952,11 +952,9 @@ static void test_HeapCreate(void)
thread_params.flags = 0;
SetEvent( thread_params.start_event );
res = WaitForSingleObject( thread_params.ready_event, 100 );
todo_wine
ok( !res, "WaitForSingleObject returned %#lx, error %lu\n", res, GetLastError() );
ret = HeapUnlock( heap );
ok( ret, "HeapUnlock failed, error %lu\n", GetLastError() );
if (res) WaitForSingleObject( thread_params.ready_event, 100 );
ret = HeapLock( heap );
ok( ret, "HeapLock failed, error %lu\n", GetLastError() );

View File

@ -1992,7 +1992,7 @@ BOOLEAN WINAPI RtlLockHeap( HANDLE heap )
{
HEAP *heapPtr = HEAP_GetPtr( heap );
if (!heapPtr) return FALSE;
RtlEnterCriticalSection( &heapPtr->cs );
heap_lock( heapPtr, 0 );
return TRUE;
}
@ -2013,7 +2013,7 @@ BOOLEAN WINAPI RtlUnlockHeap( HANDLE heap )
{
HEAP *heapPtr = HEAP_GetPtr( heap );
if (!heapPtr) return FALSE;
RtlLeaveCriticalSection( &heapPtr->cs );
heap_unlock( heapPtr, 0 );
return TRUE;
}