Rebase against 6cbe072c3799b27addb67014245ea7c59b1023dd.

This commit is contained in:
Alistair Leslie-Hughes 2024-02-29 11:17:10 +11:00
parent 91d4974f10
commit 34eb04e7cc
5 changed files with 45 additions and 45 deletions

View File

@ -1,4 +1,4 @@
From 61fb7e02aa6779469e94c79f1132c4991cb27244 Mon Sep 17 00:00:00 2001
From ad881c0cf988811e4b8662eac50f8998dfed40ca Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Mon, 6 Jul 2020 15:11:12 -0500
Subject: [PATCH] server: Create eventfd file descriptors for process objects.
@ -11,7 +11,7 @@ Subject: [PATCH] server: Create eventfd file descriptors for process objects.
4 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/server/esync.c b/server/esync.c
index c7b0323f204..27049ffbdb0 100644
index 85f7f1e060f..44214e5fe02 100644
--- a/server/esync.c
+++ b/server/esync.c
@@ -295,6 +295,24 @@ struct esync *create_esync( struct object *root, const struct unicode_str *name,
@ -49,7 +49,7 @@ index 00f9e638d83..8522d8a69ae 100644
void esync_init(void);
+int esync_create_fd( int initval, int flags );
diff --git a/server/process.c b/server/process.c
index da11b90c613..22ac16fb540 100644
index 4a5ef0876b0..a7be3ee3876 100644
--- a/server/process.c
+++ b/server/process.c
@@ -63,6 +63,7 @@
@ -77,15 +77,15 @@ index da11b90c613..22ac16fb540 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -686,6 +688,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
process->rawinput_mouse = NULL;
@@ -688,6 +690,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
process->rawinput_kbd = NULL;
memset( &process->image_info, 0, sizeof(process->image_info) );
list_init( &process->rawinput_entry );
+ process->esync_fd = -1;
list_init( &process->kernel_object );
list_init( &process->thread_list );
list_init( &process->locks );
@@ -742,6 +745,9 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
@@ -744,6 +747,9 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
if (!token_assign_label( process->token, &high_label_sid ))
goto error;
@ -95,7 +95,7 @@ index da11b90c613..22ac16fb540 100644
set_fd_events( process->msg_fd, POLLIN ); /* start listening to events */
return process;
@@ -789,6 +795,7 @@ static void process_destroy( struct object *obj )
@@ -792,6 +798,7 @@ static void process_destroy( struct object *obj )
free( process->rawinput_devices );
free( process->dir_cache );
free( process->image );
@ -103,7 +103,7 @@ index da11b90c613..22ac16fb540 100644
}
/* dump a process on stdout for debugging purposes */
@@ -806,6 +813,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
@@ -809,6 +816,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
return !process->running_threads;
}
@ -118,11 +118,11 @@ index da11b90c613..22ac16fb540 100644
{
access = default_map_access( obj, access );
diff --git a/server/process.h b/server/process.h
index 97e0d455ece..a0a071d8f88 100644
index 1e73e9d47dc..bedd8bb4586 100644
--- a/server/process.h
+++ b/server/process.h
@@ -85,6 +85,7 @@ struct process
const struct rawinput_device *rawinput_kbd; /* rawinput keyboard device, if any */
@@ -86,6 +86,7 @@ struct process
struct list rawinput_entry; /* entry in the rawinput process list */
struct list kernel_object; /* list of kernel object pointers */
pe_image_info_t image_info; /* main exe image info */
+ int esync_fd; /* esync file descriptor (signaled on exit) */
@ -130,5 +130,5 @@ index 97e0d455ece..a0a071d8f88 100644
/* process functions */
--
2.35.1
2.43.0

View File

@ -1,4 +1,4 @@
From 1cf7540fcddc9fbaa7411f3293f115555a6dd0ab Mon Sep 17 00:00:00 2001
From d7b142aa0b60d99bd225849439cd49119a6e3e80 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Mon, 6 Jul 2020 16:11:23 -0500
Subject: [PATCH] server, ntdll: Implement message waits.
@ -105,10 +105,10 @@ index 399930c444b..06d7d8babc6 100644
{
struct stat st;
diff --git a/server/protocol.def b/server/protocol.def
index 915332ece6f..dd5e996cbc7 100644
index a2700b043ba..fb290c7964c 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3921,3 +3921,8 @@ enum esync_type
@@ -3907,3 +3907,8 @@ enum esync_type
int type;
unsigned int shm_idx;
@END
@ -118,10 +118,10 @@ index 915332ece6f..dd5e996cbc7 100644
+ int in_msgwait; /* are we in a message wait? */
+@END
diff --git a/server/queue.c b/server/queue.c
index 3d5da326400..80731383401 100644
index 936a6309683..fc13b1cf6eb 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -146,6 +146,7 @@ struct msg_queue
@@ -148,6 +148,7 @@ struct msg_queue
int keystate_lock; /* owns an input keystate lock */
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
int esync_fd; /* esync file descriptor (signalled on message) */
@ -129,7 +129,7 @@ index 3d5da326400..80731383401 100644
};
struct hotkey
@@ -319,6 +320,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
@@ -321,6 +322,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
queue->keystate_lock = 0;
queue->ignore_post_msg = 0;
queue->esync_fd = -1;
@ -137,7 +137,7 @@ index 3d5da326400..80731383401 100644
list_init( &queue->send_result );
list_init( &queue->callback_result );
list_init( &queue->pending_timers );
@@ -1106,6 +1108,10 @@ static int is_queue_hung( struct msg_queue *queue )
@@ -1108,6 +1110,10 @@ static int is_queue_hung( struct msg_queue *queue )
if (get_wait_queue_thread(entry)->queue == queue)
return 0; /* thread is waiting on queue -> not hung */
}
@ -148,9 +148,9 @@ index 3d5da326400..80731383401 100644
return 1;
}
@@ -3568,3 +3574,18 @@ DECL_HANDLER(update_rawinput_devices)
process->rawinput_mouse = find_rawinput_device( process, MAKELONG(HID_USAGE_GENERIC_MOUSE, HID_USAGE_PAGE_GENERIC) );
process->rawinput_kbd = find_rawinput_device( process, MAKELONG(HID_USAGE_GENERIC_KEYBOARD, HID_USAGE_PAGE_GENERIC) );
@@ -3735,3 +3741,18 @@ DECL_HANDLER(update_rawinput_devices)
release_object( desktop );
}
}
+
+DECL_HANDLER(esync_msgwait)

View File

@ -1,4 +1,4 @@
From 4dd82c635bcf8c2c7d070d6c5786787ff2d7d887 Mon Sep 17 00:00:00 2001
From 7e6c4ffa4bcf4e008a2cf4ed75c279058d002aac Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 5 Aug 2017 03:38:38 +0200
Subject: [PATCH] ntdll: Add inline versions of RtlEnterCriticalSection /
@ -9,7 +9,7 @@ Subject: [PATCH] ntdll: Add inline versions of RtlEnterCriticalSection /
1 file changed, 34 insertions(+)
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index a7967a6c242..8b088f9d3c3 100644
index 24c583dd159..cffe27d847c 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -28,6 +28,7 @@
@ -19,10 +19,10 @@ index a7967a6c242..8b088f9d3c3 100644
+#include "wine/debug.h"
#include "wine/asm.h"
#define DECLARE_CRITICAL_SECTION(cs) \
@@ -94,6 +95,39 @@ extern struct _KUSER_SHARED_DATA *user_shared_data;
extern int CDECL NTDLL__vsnprintf( char *str, SIZE_T len, const char *format, va_list args );
extern int CDECL NTDLL__vsnwprintf( WCHAR *str, SIZE_T len, const WCHAR *format, va_list args );
#define MAX_NT_PATH_LENGTH 277
@@ -105,6 +106,39 @@ extern void (FASTCALL *pBaseThreadInitThunk)(DWORD,LPTHREAD_START_ROUTINE,void *
extern struct _KUSER_SHARED_DATA *user_shared_data;
+/* inline version of RtlEnterCriticalSection */
+static inline void enter_critical_section( RTL_CRITICAL_SECTION *crit )
@ -57,9 +57,9 @@ index a7967a6c242..8b088f9d3c3 100644
+ }
+}
+
struct dllredirect_data
{
ULONG size;
#ifdef _WIN64
static inline TEB64 *NtCurrentTeb64(void) { return NULL; }
#else
--
2.42.0
2.43.0

View File

@ -1,4 +1,4 @@
From 9abcf9173358a37b01ea189f80f841af35307922 Mon Sep 17 00:00:00 2001
From 43ca4e4a3c633d405b3d282badb028c4250f942d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 30 May 2015 02:23:15 +0200
Subject: [PATCH] ntdll: Add support for hiding wine version information from
@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Add support for hiding wine version information from
2 files changed, 103 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 8e2b3282a75..5cb6b48e7ae 100644
index fbad84d2c36..5afeb0f63b0 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -88,6 +88,9 @@ const WCHAR system_dir[] = L"C:\\windows\\system32\\";
@@ -87,6 +87,9 @@ const WCHAR system_dir[] = L"C:\\windows\\system32\\";
/* system search path */
static const WCHAR system_path[] = L"C:\\windows\\system32;C:\\windows\\system;C:\\windows";
@ -23,7 +23,7 @@ index 8e2b3282a75..5cb6b48e7ae 100644
static BOOL is_prefix_bootstrap; /* are we bootstrapping the prefix? */
static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */
static BOOL process_detaching = FALSE; /* set on process detach to avoid deadlocks with thread detach */
@@ -107,6 +110,8 @@ struct dll_dir_entry
@@ -106,6 +109,8 @@ struct dll_dir_entry
static struct list dll_dir_list = LIST_INIT( dll_dir_list ); /* extra dirs from LdrAddDllDirectory */
@ -32,7 +32,7 @@ index 8e2b3282a75..5cb6b48e7ae 100644
struct ldr_notification
{
struct list entry;
@@ -1978,6 +1983,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
@@ -2030,6 +2035,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
}
@ -129,7 +129,7 @@ index 8e2b3282a75..5cb6b48e7ae 100644
/******************************************************************
* LdrGetProcedureAddress (NTDLL.@)
*/
@@ -1997,7 +2092,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
@@ -2050,7 +2145,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
{
void *proc = name ? find_named_export( module, exports, exp_size, name->Buffer, -1, NULL )
: find_ordinal_export( module, exports, exp_size, ord - exports->Base, NULL );
@ -138,7 +138,7 @@ index 8e2b3282a75..5cb6b48e7ae 100644
{
*address = proc;
ret = STATUS_SUCCESS;
@@ -2235,6 +2330,8 @@ static void build_ntdll_module( HMODULE module )
@@ -2311,6 +2406,8 @@ static void build_ntdll_module(void)
wm->ldr.Flags &= ~LDR_DONT_RESOLVE_REFS;
node_ntdll = wm->ldr.DdagNode;
if (TRACE_ON(relay)) RELAY_SetupDLL( module );
@ -148,12 +148,12 @@ index 8e2b3282a75..5cb6b48e7ae 100644
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 8801c518039..78ff79625ea 100644
index cffe27d847c..d3c4a9cae68 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -153,6 +153,11 @@ static inline TEB64 *NtCurrentTeb64(void) { return (TEB64 *)NtCurrentTeb()->GdiB
NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*);
@@ -145,6 +145,11 @@ static inline TEB64 *NtCurrentTeb64(void) { return NULL; }
static inline TEB64 *NtCurrentTeb64(void) { return (TEB64 *)NtCurrentTeb()->GdiBatchCount; }
#endif
+/* version */
+extern const char * CDECL wine_get_version(void);
@ -164,5 +164,5 @@ index 8801c518039..78ff79625ea 100644
static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
{
--
2.38.1
2.43.0

View File

@ -1 +1 @@
c2a4f3810b17f9efa3c848b473b19f641f7881f6
6cbe072c3799b27addb67014245ea7c59b1023dd