You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase against 0b79e2caa6f224fc0da672886c07f4f32dda4682.
This commit is contained in:
@@ -1,27 +1,34 @@
|
||||
From f260254e168fbaad0321273037762e218eb6b7a6 Mon Sep 17 00:00:00 2001
|
||||
From 153efcdc01d57fc29c6d1e80eda52f43666b34a6 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 14:57:42 -0500
|
||||
Subject: [PATCH] ntdll: Implement waiting on manual-reset events.
|
||||
|
||||
---
|
||||
dlls/ntdll/unix/esync.c | 22 +++++++++++++++++-----
|
||||
1 file changed, 17 insertions(+), 5 deletions(-)
|
||||
dlls/ntdll/unix/esync.c | 26 ++++++++++++++++++--------
|
||||
1 file changed, 18 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 97d468b2449..4f993689e0d 100644
|
||||
index 97d468b2449..d58cb6c1ee2 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -483,12 +483,24 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -38,9 +38,7 @@
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
# include <sys/mman.h>
|
||||
#endif
|
||||
-#ifdef HAVE_SYS_POLL_H
|
||||
-# include <sys/poll.h>
|
||||
-#endif
|
||||
+#include <poll.h>
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
@@ -483,12 +481,24 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
int64_t value;
|
||||
ssize_t size;
|
||||
|
||||
- if ((size = read( fds[i].fd, &value, sizeof(value) )) == sizeof(value))
|
||||
+ if (obj->type == ESYNC_MANUAL_EVENT)
|
||||
{
|
||||
- /* We found our object. */
|
||||
- TRACE("Woken up by handle %p [%d].\n", handles[i], i);
|
||||
- update_grabbed_object( obj );
|
||||
- return i;
|
||||
+ {
|
||||
+ /* Don't grab the object, just check if it's signaled. */
|
||||
+ if (fds[i].revents & POLLIN)
|
||||
+ {
|
||||
@@ -30,7 +37,11 @@ index 97d468b2449..4f993689e0d 100644
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
{
|
||||
- /* We found our object. */
|
||||
- TRACE("Woken up by handle %p [%d].\n", handles[i], i);
|
||||
- update_grabbed_object( obj );
|
||||
- return i;
|
||||
+ if ((size = read( fds[i].fd, &value, sizeof(value) )) == sizeof(value))
|
||||
+ {
|
||||
+ /* We found our object. */
|
||||
@@ -42,5 +53,5 @@ index 97d468b2449..4f993689e0d 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.28.0
|
||||
2.33.0
|
||||
|
||||
|
Reference in New Issue
Block a user