Module: wine
Branch: master
Commit: a17469b165d30f14c3340608602085f7603496b9
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a17469b165d30f14c3340608…
Author: Zebediah Figura <zfigura(a)codeweavers.com>
Date: Mon Jul 5 11:20:00 2021 -0500
server: Call the close_handle callback and release_object_from_handle() in the same loop.
Several server objects check if the last handle is being closed in their
close_handle callback. If a process holds the last two handles to an object,
this code path currently won't be triggered.
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
server/handle.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/server/handle.c b/server/handle.c
index 6efd82f2ff9..15da701ee99 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -174,21 +174,16 @@ static void handle_table_destroy( struct object *obj )
assert( obj->ops == &handle_table_ops );
- /* first notify all objects that handles are being closed */
- if (table->process)
- {
- for (i = 0, entry = table->entries; i <= table->last; i++, entry++)
- {
- struct object *obj = entry->ptr;
- if (obj) obj->ops->close_handle( obj, table->process, index_to_handle(i) );
- }
- }
-
for (i = 0, entry = table->entries; i <= table->last; i++, entry++)
{
struct object *obj = entry->ptr;
entry->ptr = NULL;
- if (obj) release_object_from_handle( obj );
+ if (obj)
+ {
+ if (table->process)
+ obj->ops->close_handle( obj, table->process, index_to_handle(i) );
+ release_object_from_handle( obj );
+ }
}
free( table->entries );
}
Module: wine
Branch: master
Commit: 3f04fdd87699c653409d8e87cf25f30db18f8cbc
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3f04fdd87699c653409d8e87…
Author: Zebediah Figura <zfigura(a)codeweavers.com>
Date: Mon Jul 5 11:19:59 2021 -0500
server: Don't check the user data for NULL in async_terminate().
This semantically reverts 481517178ff7dd542966d7f11f3d61b3fc8a0776.
That commit was used to implement NtFlushBuffersFile, which at the time didn't
use a callback function. 9050b58f0769fca75c4cebed7be3cce51989814e changed it to
use irp_completion(), since the result of a blocking flush needed to be taken
from the IOSB.
As of 97afac469fbe012e22acc1f1045c88b1004a241f that's not true anymore, but on
the other hand it is theoretically possible for a device driver to touch the
Information member of the IOSB, and we don't seem to lose anything by making
all asyncs take a common path.
Since all asyncs pass user data and there's no clear reason for them not to,
let's get rid of a bit of extra code complexity that's no longer used.
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
server/async.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/server/async.c b/server/async.c
index 4dedb27f3d8..0425e4eddf7 100644
--- a/server/async.c
+++ b/server/async.c
@@ -161,18 +161,14 @@ void async_terminate( struct async *async, unsigned int status )
if (!async->direct_result)
{
- if (async->data.user)
- {
- apc_call_t data;
-
- memset( &data, 0, sizeof(data) );
- data.type = APC_ASYNC_IO;
- data.async_io.user = async->data.user;
- data.async_io.sb = async->data.iosb;
- data.async_io.status = status;
- thread_queue_apc( async->thread->process, async->thread, &async->obj, &data );
- }
- else async_set_result( &async->obj, STATUS_SUCCESS, 0 );
+ apc_call_t data;
+
+ memset( &data, 0, sizeof(data) );
+ data.type = APC_ASYNC_IO;
+ data.async_io.user = async->data.user;
+ data.async_io.sb = async->data.iosb;
+ data.async_io.status = status;
+ thread_queue_apc( async->thread->process, async->thread, &async->obj, &data );
}
async_reselect( async );
Module: wine
Branch: master
Commit: da44bcc9d074f634315fd1e042a18c99189fb25a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=da44bcc9d074f634315fd1e0…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Mon Jul 5 17:02:34 2021 +0200
d2d1: Do not clear the device context state in d2d_device_context_draw().
Clearing the state should no longer be needed now that we use
SwapDeviceContextState() and have our own dedicated state object.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/d2d1/device.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c
index 3b444321c87..44840f0010f 100644
--- a/dlls/d2d1/device.c
+++ b/dlls/d2d1/device.c
@@ -139,7 +139,6 @@ static void d2d_device_context_draw(struct d2d_device_context *render_target, en
ID3D11Device1_GetImmediateContext1(device, &context);
ID3D11DeviceContext1_SwapDeviceContextState(context, render_target->d3d_state, &prev_state);
- ID3D11DeviceContext1_ClearState(context);
ID3D11DeviceContext1_IASetInputLayout(context, shape_resources->il);
ID3D11DeviceContext1_IASetPrimitiveTopology(context, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);