Rebase against 28ec2795186c7db83637b3b17e4fa95095ebb77d.

This commit is contained in:
Zebediah Figura
2020-04-27 16:19:14 -05:00
parent 2ad422ff4d
commit 69a4e4baa2
20 changed files with 119 additions and 1678 deletions

View File

@@ -1,4 +1,4 @@
From 430aff7c0693c5529ce4af2d515bf48d6ba49e15 Mon Sep 17 00:00:00 2001
From 3248f2b2ee3d8aeede1d3d51f8e3d570d982a69b Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 11 Jun 2018 13:10:36 -0500
Subject: [PATCH] ntdll: Use shared memory segments to store semaphore and
@@ -16,7 +16,7 @@ since now we don't have to allocate separate structures.
3 files changed, 155 insertions(+), 199 deletions(-)
diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
index c1d8882d817..e8ee1cbc9ff 100644
index c1d8882d817..ea71c960007 100644
--- a/dlls/ntdll/esync.c
+++ b/dlls/ntdll/esync.c
@@ -32,6 +32,7 @@
@@ -63,8 +63,8 @@ index c1d8882d817..e8ee1cbc9ff 100644
+{
+ struct stat st;
+
+ if (stat( wine_get_config_dir(), &st ) == -1)
+ ERR("Cannot stat %s\n", wine_get_config_dir());
+ if (stat( config_dir, &st ) == -1)
+ ERR("Cannot stat %s\n", config_dir);
+
+ if (st.st_ino != (unsigned long)st.st_ino)
+ sprintf( shm_name, "/wine-%lx%08lx-esync", (unsigned long)((unsigned long long)st.st_ino >> 32), (unsigned long)st.st_ino );
@@ -670,10 +670,10 @@ index f79b9a06c90..88f491e5ab4 100644
extern NTSTATUS esync_create_semaphore(HANDLE *handle, ACCESS_MASK access,
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 119d35731f4..2ac4ef6a23b 100644
index f7f9910daf6..752a0b3b622 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -44,6 +44,7 @@
@@ -51,6 +51,7 @@
#include "wine/server.h"
#include "ntdll_misc.h"
#include "ddk/wdm.h"
@@ -681,7 +681,7 @@ index 119d35731f4..2ac4ef6a23b 100644
WINE_DEFAULT_DEBUG_CHANNEL(module);
WINE_DECLARE_DEBUG_CHANNEL(relay);
@@ -4404,6 +4405,9 @@ void __wine_process_init(void)
@@ -4647,6 +4648,9 @@ void __wine_process_init(void)
peb->ProcessHeap = RtlCreateHeap( HEAP_GROWABLE, NULL, 0, 0, NULL, NULL );
peb->LoaderLock = &loader_section;
@@ -692,5 +692,5 @@ index 119d35731f4..2ac4ef6a23b 100644
init_directories();
init_user_process_params( info_size );
--
2.24.0
2.26.2

View File

@@ -1,4 +1,4 @@
From ba4c80e2a7abe2ba265f949312c78045bef5695c Mon Sep 17 00:00:00 2001
From 4863e6b323f7ecc1fceaff42a573cd0b9a07f3d5 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sat, 4 Aug 2018 15:15:12 -0500
Subject: [PATCH] ntdll, server: Abort if esync is enabled for the server but
@@ -11,7 +11,7 @@ Subject: [PATCH] ntdll, server: Abort if esync is enabled for the server but
3 files changed, 40 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
index 8255810a924..fb1953fb90c 100644
index 0625de9fff0..522704f757f 100644
--- a/dlls/ntdll/esync.c
+++ b/dlls/ntdll/esync.c
@@ -115,10 +115,29 @@ static void **shm_addrs;
@@ -41,8 +41,8 @@ index 8255810a924..fb1953fb90c 100644
+ return;
+ }
+
if (stat( wine_get_config_dir(), &st ) == -1)
ERR("Cannot stat %s\n", wine_get_config_dir());
if (stat( config_dir, &st ) == -1)
ERR("Cannot stat %s\n", config_dir);
@@ -128,7 +147,14 @@ void esync_init(void)
sprintf( shm_name, "/wine-%lx-esync", (unsigned long)st.st_ino );
@@ -61,10 +61,10 @@ index 8255810a924..fb1953fb90c 100644
pagesize = sysconf( _SC_PAGESIZE );
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 2ac4ef6a23b..6df24c076c5 100644
index 752a0b3b622..36c5092a4b1 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -4405,8 +4405,7 @@ void __wine_process_init(void)
@@ -4648,8 +4648,7 @@ void __wine_process_init(void)
peb->ProcessHeap = RtlCreateHeap( HEAP_GROWABLE, NULL, 0, 0, NULL, NULL );
peb->LoaderLock = &loader_section;
@@ -75,10 +75,10 @@ index 2ac4ef6a23b..6df24c076c5 100644
init_unix_codepage();
init_directories();
diff --git a/server/esync.c b/server/esync.c
index 1fc9316b1b5..cb4de2daa77 100644
index 11e5e482024..bc2ce61c9a2 100644
--- a/server/esync.c
+++ b/server/esync.c
@@ -395,6 +395,18 @@ DECL_HANDLER(create_esync)
@@ -394,6 +394,18 @@ DECL_HANDLER(create_esync)
const struct security_descriptor *sd;
const struct object_attributes *objattr = get_req_object_attributes( &sd, &name, &root );
@@ -98,5 +98,5 @@ index 1fc9316b1b5..cb4de2daa77 100644
if ((esync = create_esync( root, &name, objattr->attributes, req->initval, req->flags, req->type, sd )))
--
2.24.0
2.26.2