[PATCH 2/5] server: Do not call async_terminate() when restarting an already terminated async.
Zebediah Figura
zfigura at codeweavers.com
Tue Aug 31 19:23:48 CDT 2021
At best this is a no-op. At worst this will emit an extra APC_ASYNC_IO where
the termination (e.g. cancellation) should already have emitted one.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
server/async.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/server/async.c b/server/async.c
index b290005f9a0..086e5eb2870 100644
--- a/server/async.c
+++ b/server/async.c
@@ -387,13 +387,11 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
if (status == STATUS_PENDING) /* restart it */
{
- status = async->status;
- async->status = STATUS_PENDING;
-
- if (status != STATUS_ALERTED) /* it was terminated in the meantime */
- async_terminate( async, status );
- else
+ if (async->status == STATUS_ALERTED)
+ {
+ async->status = STATUS_PENDING;
async_reselect( async );
+ }
}
else
{
--
2.33.0
More information about the wine-devel
mailing list