mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-common: Get rid of InterlockedIncrement().
This commit is contained in:
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
@@ -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 =
|
||||
|
Reference in New Issue
Block a user