vkd3d-common: Get rid of InterlockedIncrement().

This commit is contained in:
Henri Verbeet
2024-01-30 12:54:54 +01:00
committed by Alexandre Julliard
parent 51f13391e6
commit c64921e79b
Notes: Alexandre Julliard 2024-02-06 23:42:38 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/633
3 changed files with 22 additions and 29 deletions

View File

@@ -625,7 +625,7 @@ static void test_adapter_luid(void)
struct parent
{
IUnknown IUnknown_iface;
LONG refcount;
unsigned int refcount;
};
static struct parent *parent_from_IUnknown(IUnknown *iface)
@@ -651,14 +651,14 @@ static ULONG STDMETHODCALLTYPE parent_AddRef(IUnknown *iface)
{
struct parent *parent = parent_from_IUnknown(iface);
return InterlockedIncrement(&parent->refcount);
return vkd3d_atomic_increment_u32(&parent->refcount);
}
static ULONG STDMETHODCALLTYPE parent_Release(IUnknown *iface)
{
struct parent *parent = parent_from_IUnknown(iface);
return InterlockedDecrement(&parent->refcount);
return InterlockedDecrement((LONG *)&parent->refcount);
}
static const struct IUnknownVtbl parent_vtbl =