Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
11db0ea6
Commit
11db0ea6
authored
Jan 12, 2005
by
James Hawkins
Committed by
Alexandre Julliard
Jan 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use only stored result of Interlocked* in AddRef/Release.
parent
452491bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
21 deletions
+30
-21
device.c
dlls/wined3d/device.c
+10
-7
directx.c
dlls/wined3d/directx.c
+10
-7
stateblock.c
dlls/wined3d/stateblock.c
+10
-7
No files found.
dlls/wined3d/device.c
View file @
11db0ea6
...
@@ -2998,21 +2998,24 @@ HRESULT WINAPI IWineD3DDeviceImpl_QueryInterface(IWineD3DDevice *iface,REFIID ri
...
@@ -2998,21 +2998,24 @@ HRESULT WINAPI IWineD3DDeviceImpl_QueryInterface(IWineD3DDevice *iface,REFIID ri
ULONG
WINAPI
IWineD3DDeviceImpl_AddRef
(
IWineD3DDevice
*
iface
)
{
ULONG
WINAPI
IWineD3DDeviceImpl_AddRef
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
TRACE
(
"(%p) : AddRef increasing from %ld
\n
"
,
This
,
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) : AddRef increasing from %ld
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
}
ULONG
WINAPI
IWineD3DDeviceImpl_Release
(
IWineD3DDevice
*
iface
)
{
ULONG
WINAPI
IWineD3DDeviceImpl_Release
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
ULONG
ref
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) : Releasing from %ld
\n
"
,
This
,
This
->
ref
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) : Releasing from %ld
\n
"
,
This
,
refCount
+
1
);
if
(
ref
==
0
)
{
if
(
!
refCount
)
{
IWineD3DStateBlock_Release
((
IWineD3DStateBlock
*
)
This
->
stateBlock
);
IWineD3DStateBlock_Release
((
IWineD3DStateBlock
*
)
This
->
stateBlock
);
IWineD3D_Release
(
This
->
wineD3D
);
IWineD3D_Release
(
This
->
wineD3D
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
}
return
ref
;
return
ref
Count
;
}
}
/**********************************************************
/**********************************************************
...
...
dlls/wined3d/directx.c
View file @
11db0ea6
...
@@ -1613,17 +1613,20 @@ HRESULT WINAPI IWineD3DImpl_QueryInterface(IWineD3D *iface,REFIID riid,LPVOID *p
...
@@ -1613,17 +1613,20 @@ HRESULT WINAPI IWineD3DImpl_QueryInterface(IWineD3D *iface,REFIID riid,LPVOID *p
ULONG
WINAPI
IWineD3DImpl_AddRef
(
IWineD3D
*
iface
)
{
ULONG
WINAPI
IWineD3DImpl_AddRef
(
IWineD3D
*
iface
)
{
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
TRACE
(
"(%p) : AddRef increasing from %ld
\n
"
,
This
,
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) : AddRef increasing from %ld
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
}
ULONG
WINAPI
IWineD3DImpl_Release
(
IWineD3D
*
iface
)
{
ULONG
WINAPI
IWineD3DImpl_Release
(
IWineD3D
*
iface
)
{
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
ULONG
ref
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) : Releasing from %ld
\n
"
,
This
,
This
->
ref
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) : Releasing from %ld
\n
"
,
This
,
refCount
+
1
);
if
(
ref
==
0
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
ref
;
if
(
!
refCount
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
refCount
;
}
}
/**********************************************************
/**********************************************************
...
...
dlls/wined3d/stateblock.c
View file @
11db0ea6
...
@@ -262,20 +262,23 @@ HRESULT WINAPI IWineD3DStateBlockImpl_QueryInterface(IWineD3DStateBlock *iface,R
...
@@ -262,20 +262,23 @@ HRESULT WINAPI IWineD3DStateBlockImpl_QueryInterface(IWineD3DStateBlock *iface,R
ULONG
WINAPI
IWineD3DStateBlockImpl_AddRef
(
IWineD3DStateBlock
*
iface
)
{
ULONG
WINAPI
IWineD3DStateBlockImpl_AddRef
(
IWineD3DStateBlock
*
iface
)
{
IWineD3DStateBlockImpl
*
This
=
(
IWineD3DStateBlockImpl
*
)
iface
;
IWineD3DStateBlockImpl
*
This
=
(
IWineD3DStateBlockImpl
*
)
iface
;
TRACE
(
"(%p) : AddRef increasing from %ld
\n
"
,
This
,
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) : AddRef increasing from %ld
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
}
ULONG
WINAPI
IWineD3DStateBlockImpl_Release
(
IWineD3DStateBlock
*
iface
)
{
ULONG
WINAPI
IWineD3DStateBlockImpl_Release
(
IWineD3DStateBlock
*
iface
)
{
IWineD3DStateBlockImpl
*
This
=
(
IWineD3DStateBlockImpl
*
)
iface
;
IWineD3DStateBlockImpl
*
This
=
(
IWineD3DStateBlockImpl
*
)
iface
;
ULONG
ref
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) : Releasing from %ld
\n
"
,
This
,
This
->
ref
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) : Releasing from %ld
\n
"
,
This
,
refCount
+
1
);
if
(
ref
==
0
)
{
if
(
!
refCount
)
{
IWineD3DDevice_Release
((
IWineD3DDevice
*
)
This
->
wineD3DDevice
);
IWineD3DDevice_Release
((
IWineD3DDevice
*
)
This
->
wineD3DDevice
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
}
return
ref
;
return
ref
Count
;
}
}
/**********************************************************
/**********************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment