mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against f86a66b660267bf245817350a6012e0c5c6547df.
This commit is contained in:
parent
560db77d41
commit
94e31f7578
@ -1,71 +1,82 @@
|
||||
From 0dc447fc1d384c9412e9c8f55bfef9adfaeec994 Mon Sep 17 00:00:00 2001
|
||||
From 42ca0134ae551e938cb79b3a818231ed0fc30745 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.
|
||||
|
||||
---
|
||||
dlls/ntdll/heap.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
dlls/ntdll/heap.c | 23 +++++++++++++++++++----
|
||||
1 file changed, 19 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
|
||||
index 1b6337d4ce8..ea2d4153b96 100644
|
||||
index 40c317417ce..93aeadaa1ba 100644
|
||||
--- a/dlls/ntdll/heap.c
|
||||
+++ b/dlls/ntdll/heap.c
|
||||
@@ -457,13 +457,13 @@ static inline ULONG heap_get_flags( const HEAP *heap, ULONG flags )
|
||||
static void heap_lock( HEAP *heap, ULONG flags )
|
||||
@@ -469,13 +469,13 @@ static inline ULONG heap_get_flags( const struct heap *heap, ULONG flags )
|
||||
static void heap_lock( struct heap *heap, ULONG flags )
|
||||
{
|
||||
if (heap_get_flags( heap, flags ) & HEAP_NO_SERIALIZE) return;
|
||||
- RtlEnterCriticalSection( &heap->cs );
|
||||
+ enter_critical_section( &heap->cs );
|
||||
}
|
||||
|
||||
static void heap_unlock( HEAP *heap, ULONG flags )
|
||||
static void heap_unlock( struct heap *heap, ULONG flags )
|
||||
{
|
||||
if (heap_get_flags( heap, flags ) & HEAP_NO_SERIALIZE) return;
|
||||
- RtlLeaveCriticalSection( &heap->cs );
|
||||
+ leave_critical_section( &heap->cs );
|
||||
}
|
||||
|
||||
static void heap_set_status( const HEAP *heap, ULONG flags, NTSTATUS status )
|
||||
@@ -1401,9 +1401,9 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, PVOID addr, SIZE_T totalSize, SIZE_T c
|
||||
static void heap_set_status( const struct heap *heap, ULONG flags, NTSTATUS status )
|
||||
@@ -1383,9 +1383,9 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, PVOID addr, SIZE_T totalSize, SIZE_T c
|
||||
/* link it into the per-process heap list */
|
||||
if (processHeap)
|
||||
if (process_heap)
|
||||
{
|
||||
- RtlEnterCriticalSection( &processHeap->cs );
|
||||
+ enter_critical_section( &processHeap->cs );
|
||||
list_add_head( &processHeap->entry, &heap->entry );
|
||||
- RtlLeaveCriticalSection( &processHeap->cs );
|
||||
+ leave_critical_section( &processHeap->cs );
|
||||
- RtlEnterCriticalSection( &process_heap->cs );
|
||||
+ enter_critical_section( &process_heap->cs );
|
||||
list_add_head( &process_heap->entry, &heap->entry );
|
||||
- RtlLeaveCriticalSection( &process_heap->cs );
|
||||
+ leave_critical_section( &process_heap->cs );
|
||||
}
|
||||
else if (!addr)
|
||||
{
|
||||
@@ -1447,9 +1447,9 @@ HANDLE WINAPI RtlDestroyHeap( HANDLE heap )
|
||||
if (heap == processHeap) return heap; /* cannot delete the main process heap */
|
||||
@@ -1441,9 +1441,15 @@ HANDLE WINAPI RtlDestroyHeap( HANDLE handle )
|
||||
if (heap == process_heap) return handle; /* cannot delete the main process heap */
|
||||
|
||||
/* remove it from the per-process list */
|
||||
- RtlEnterCriticalSection( &processHeap->cs );
|
||||
+<<<<<<< HEAD
|
||||
RtlEnterCriticalSection( &process_heap->cs );
|
||||
list_remove( &heap->entry );
|
||||
RtlLeaveCriticalSection( &process_heap->cs );
|
||||
+=======
|
||||
+ enter_critical_section( &processHeap->cs );
|
||||
list_remove( &heapPtr->entry );
|
||||
- RtlLeaveCriticalSection( &processHeap->cs );
|
||||
+ list_remove( &heapPtr->entry );
|
||||
+ leave_critical_section( &processHeap->cs );
|
||||
+>>>>>>> 7dd6cd87394 (ntdll: Use fast CS functions for heap locking.)
|
||||
|
||||
heapPtr->cs.DebugInfo->Spare[0] = 0;
|
||||
RtlDeleteCriticalSection( &heapPtr->cs );
|
||||
@@ -1930,7 +1930,7 @@ ULONG WINAPI RtlGetProcessHeaps( ULONG count, HANDLE *heaps )
|
||||
heap->cs.DebugInfo->Spare[0] = 0;
|
||||
RtlDeleteCriticalSection( &heap->cs );
|
||||
@@ -1938,15 +1944,24 @@ ULONG WINAPI RtlGetProcessHeaps( ULONG count, HANDLE *heaps )
|
||||
ULONG total = 1; /* main heap */
|
||||
struct list *ptr;
|
||||
|
||||
- RtlEnterCriticalSection( &processHeap->cs );
|
||||
+<<<<<<< HEAD
|
||||
RtlEnterCriticalSection( &process_heap->cs );
|
||||
LIST_FOR_EACH( ptr, &process_heap->entry ) total++;
|
||||
+=======
|
||||
+ enter_critical_section( &processHeap->cs );
|
||||
LIST_FOR_EACH( ptr, &processHeap->entry ) total++;
|
||||
+ LIST_FOR_EACH( ptr, &processHeap->entry ) total++;
|
||||
+>>>>>>> 7dd6cd87394 (ntdll: Use fast CS functions for heap locking.)
|
||||
if (total <= count)
|
||||
{
|
||||
@@ -1938,7 +1938,7 @@ ULONG WINAPI RtlGetProcessHeaps( ULONG count, HANDLE *heaps )
|
||||
LIST_FOR_EACH( ptr, &processHeap->entry )
|
||||
*heaps++ = LIST_ENTRY( ptr, HEAP, entry );
|
||||
*heaps++ = process_heap;
|
||||
LIST_FOR_EACH( ptr, &process_heap->entry )
|
||||
*heaps++ = LIST_ENTRY( ptr, struct heap, entry );
|
||||
}
|
||||
- RtlLeaveCriticalSection( &processHeap->cs );
|
||||
+<<<<<<< HEAD
|
||||
RtlLeaveCriticalSection( &process_heap->cs );
|
||||
+=======
|
||||
+ leave_critical_section( &processHeap->cs );
|
||||
+>>>>>>> 7dd6cd87394 (ntdll: Use fast CS functions for heap locking.)
|
||||
return total;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "35939bbe0c04534da07ece7f6a47a560d356f7a1"
|
||||
echo "f86a66b660267bf245817350a6012e0c5c6547df"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1 +1 @@
|
||||
35939bbe0c04534da07ece7f6a47a560d356f7a1
|
||||
f86a66b660267bf245817350a6012e0c5c6547df
|
||||
|
Loading…
Reference in New Issue
Block a user