You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 8cb68e43dec6e6bb32fcdf82e03a6d4263dd2354.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From ca6a89f3bfb6aa5d7ac05bb0c469b527ae1a9d9d Mon Sep 17 00:00:00 2001
|
||||
From 1cf7540fcddc9fbaa7411f3293f115555a6dd0ab 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.
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
3 files changed, 75 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 2ae334d8417..608c318c1c7 100644
|
||||
index 399930c444b..06d7d8babc6 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -475,12 +475,13 @@ static void update_grabbed_object( struct esync *obj )
|
||||
@@ -474,12 +474,13 @@ static void update_grabbed_object( struct esync *obj )
|
||||
|
||||
/* A value of STATUS_NOT_IMPLEMENTED returned from this function means that we
|
||||
* need to delegate to server_select(). */
|
||||
@@ -28,7 +28,7 @@ index 2ae334d8417..608c318c1c7 100644
|
||||
LONGLONG timeleft;
|
||||
LARGE_INTEGER now;
|
||||
ULONGLONG end;
|
||||
@@ -508,6 +509,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -507,6 +508,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ index 2ae334d8417..608c318c1c7 100644
|
||||
if (has_esync && has_server)
|
||||
FIXME("Can't wait on esync and server objects at the same time!\n");
|
||||
else if (has_server)
|
||||
@@ -519,6 +523,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -518,6 +522,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
for (i = 0; i < count; i++)
|
||||
TRACE(" %p", handles[i]);
|
||||
|
||||
@@ -48,7 +48,7 @@ index 2ae334d8417..608c318c1c7 100644
|
||||
if (!timeout)
|
||||
TRACE(", timeout = INFINITE.\n");
|
||||
else
|
||||
@@ -558,7 +565,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -557,7 +564,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
int64_t value;
|
||||
ssize_t size;
|
||||
|
||||
@@ -59,7 +59,7 @@ index 2ae334d8417..608c318c1c7 100644
|
||||
{
|
||||
/* Don't grab the object, just check if it's signaled. */
|
||||
if (fds[i].revents & POLLIN)
|
||||
@@ -603,6 +612,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -602,6 +611,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,10 +105,10 @@ index 2ae334d8417..608c318c1c7 100644
|
||||
{
|
||||
struct stat st;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 5cf63cbac21..f837944574e 100644
|
||||
index 915332ece6f..dd5e996cbc7 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3797,3 +3797,8 @@ enum esync_type
|
||||
@@ -3921,3 +3921,8 @@ enum esync_type
|
||||
int type;
|
||||
unsigned int shm_idx;
|
||||
@END
|
||||
@@ -118,10 +118,10 @@ index 5cf63cbac21..f837944574e 100644
|
||||
+ int in_msgwait; /* are we in a message wait? */
|
||||
+@END
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 1702acb8480..9593ae532d4 100644
|
||||
index 3d5da326400..80731383401 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -144,6 +144,7 @@ struct msg_queue
|
||||
@@ -146,6 +146,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 1702acb8480..9593ae532d4 100644
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -317,6 +318,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -319,6 +320,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 1702acb8480..9593ae532d4 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -1001,6 +1003,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
@@ -1106,6 +1108,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 1702acb8480..9593ae532d4 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -3456,3 +3462,18 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
process->rawinput_mouse = find_rawinput_device( process, 1, 2 );
|
||||
process->rawinput_kbd = find_rawinput_device( process, 1, 6 );
|
||||
@@ -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) );
|
||||
}
|
||||
+
|
||||
+DECL_HANDLER(esync_msgwait)
|
||||
@@ -168,5 +168,5 @@ index 1702acb8480..9593ae532d4 100644
|
||||
+ set_fd_events( queue->fd, req->in_msgwait ? POLLIN : 0 );
|
||||
+}
|
||||
--
|
||||
2.35.1
|
||||
2.43.0
|
||||
|
||||
|
Reference in New Issue
Block a user