Rebase against 99ce6e87a3b22c5602d7bbedd43bb40627b63321.

This commit is contained in:
Alistair Leslie-Hughes
2022-05-26 15:30:47 +10:00
parent f0d1a4a5ba
commit 8ee2551c93
4 changed files with 20 additions and 20 deletions

View File

@@ -1,4 +1,4 @@
From de8040e1a8900116a6a3fa0f0560e4a3c66d4d71 Mon Sep 17 00:00:00 2001
From 0dc447fc1d384c9412e9c8f55bfef9adfaeec994 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 5 Aug 2017 03:39:23 +0200
Subject: [PATCH] ntdll: Use fast CS functions for heap locking.
@@ -8,10 +8,10 @@ Subject: [PATCH] ntdll: Use fast CS functions for heap locking.
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index 51567d0552b..b1dcb01cd4f 100644
index 1b6337d4ce8..ea2d4153b96 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -340,13 +340,13 @@ static inline ULONG heap_get_flags( const HEAP *heap, ULONG flags )
@@ -457,13 +457,13 @@ static inline ULONG heap_get_flags( const HEAP *heap, ULONG flags )
static void heap_lock( HEAP *heap, ULONG flags )
{
if (heap_get_flags( heap, flags ) & HEAP_NO_SERIALIZE) return;
@@ -27,19 +27,19 @@ index 51567d0552b..b1dcb01cd4f 100644
}
static void heap_set_status( const HEAP *heap, ULONG flags, NTSTATUS status )
@@ -1577,9 +1577,9 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, PVOID addr, SIZE_T totalSize, SIZE_T c
@@ -1401,9 +1401,9 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, PVOID addr, SIZE_T totalSize, SIZE_T c
/* link it into the per-process heap list */
if (processHeap)
{
HEAP *heapPtr = subheap->heap;
- RtlEnterCriticalSection( &processHeap->cs );
+ enter_critical_section( &processHeap->cs );
list_add_head( &processHeap->entry, &heapPtr->entry );
list_add_head( &processHeap->entry, &heap->entry );
- RtlLeaveCriticalSection( &processHeap->cs );
+ leave_critical_section( &processHeap->cs );
}
else if (!addr)
{
@@ -1623,9 +1623,9 @@ HANDLE WINAPI RtlDestroyHeap( HANDLE heap )
@@ -1447,9 +1447,9 @@ HANDLE WINAPI RtlDestroyHeap( HANDLE heap )
if (heap == processHeap) return heap; /* cannot delete the main process heap */
/* remove it from the per-process list */
@@ -51,7 +51,7 @@ index 51567d0552b..b1dcb01cd4f 100644
heapPtr->cs.DebugInfo->Spare[0] = 0;
RtlDeleteCriticalSection( &heapPtr->cs );
@@ -2171,7 +2171,7 @@ ULONG WINAPI RtlGetProcessHeaps( ULONG count, HANDLE *heaps )
@@ -1930,7 +1930,7 @@ ULONG WINAPI RtlGetProcessHeaps( ULONG count, HANDLE *heaps )
ULONG total = 1; /* main heap */
struct list *ptr;
@@ -60,7 +60,7 @@ index 51567d0552b..b1dcb01cd4f 100644
LIST_FOR_EACH( ptr, &processHeap->entry ) total++;
if (total <= count)
{
@@ -2179,7 +2179,7 @@ ULONG WINAPI RtlGetProcessHeaps( ULONG count, HANDLE *heaps )
@@ -1938,7 +1938,7 @@ ULONG WINAPI RtlGetProcessHeaps( ULONG count, HANDLE *heaps )
LIST_FOR_EACH( ptr, &processHeap->entry )
*heaps++ = LIST_ENTRY( ptr, HEAP, entry );
}