Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
b2bb57a4
Commit
b2bb57a4
authored
Jan 12, 2005
by
Paul Vriens
Committed by
Alexandre Julliard
Jan 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- use Interlocked* functions in AddRef and Release.
- store the result of the Interlocked functions and use only this.
parent
1bc887bc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
16 deletions
+28
-16
chordmap.c
dlls/dmcompos/chordmap.c
+7
-4
chordmaptrack.c
dlls/dmcompos/chordmaptrack.c
+7
-4
composer.c
dlls/dmcompos/composer.c
+7
-4
signposttrack.c
dlls/dmcompos/signposttrack.c
+7
-4
No files found.
dlls/dmcompos/chordmap.c
View file @
b2bb57a4
...
...
@@ -54,17 +54,20 @@ HRESULT WINAPI IDirectMusicChordMapImpl_IUnknown_QueryInterface (LPUNKNOWN iface
ULONG
WINAPI
IDirectMusicChordMapImpl_IUnknown_AddRef
(
LPUNKNOWN
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicChordMapImpl
,
UnknownVtbl
,
iface
);
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMCOMPOS_LockModule
();
return
++
(
This
->
ref
)
;
return
ref
;
}
ULONG
WINAPI
IDirectMusicChordMapImpl_IUnknown_Release
(
LPUNKNOWN
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicChordMapImpl
,
UnknownVtbl
,
iface
);
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
dlls/dmcompos/chordmaptrack.c
View file @
b2bb57a4
...
...
@@ -51,17 +51,20 @@ HRESULT WINAPI IDirectMusicChordMapTrack_IUnknown_QueryInterface (LPUNKNOWN ifac
ULONG
WINAPI
IDirectMusicChordMapTrack_IUnknown_AddRef
(
LPUNKNOWN
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicChordMapTrack
,
UnknownVtbl
,
iface
);
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMCOMPOS_LockModule
();
return
++
(
This
->
ref
)
;
return
ref
;
}
ULONG
WINAPI
IDirectMusicChordMapTrack_IUnknown_Release
(
LPUNKNOWN
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicChordMapTrack
,
UnknownVtbl
,
iface
);
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
dlls/dmcompos/composer.c
View file @
b2bb57a4
...
...
@@ -38,17 +38,20 @@ HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMPOSER if
ULONG
WINAPI
IDirectMusicComposerImpl_AddRef
(
LPDIRECTMUSICCOMPOSER
iface
)
{
IDirectMusicComposerImpl
*
This
=
(
IDirectMusicComposerImpl
*
)
iface
;
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMCOMPOS_LockModule
();
return
++
(
This
->
ref
)
;
return
ref
;
}
ULONG
WINAPI
IDirectMusicComposerImpl_Release
(
LPDIRECTMUSICCOMPOSER
iface
)
{
IDirectMusicComposerImpl
*
This
=
(
IDirectMusicComposerImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
dlls/dmcompos/signposttrack.c
View file @
b2bb57a4
...
...
@@ -51,17 +51,20 @@ HRESULT WINAPI IDirectMusicSignPostTrack_IUnknown_QueryInterface (LPUNKNOWN ifac
ULONG
WINAPI
IDirectMusicSignPostTrack_IUnknown_AddRef
(
LPUNKNOWN
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicSignPostTrack
,
UnknownVtbl
,
iface
);
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMCOMPOS_LockModule
();
return
++
(
This
->
ref
)
;
return
ref
;
}
ULONG
WINAPI
IDirectMusicSignPostTrack_IUnknown_Release
(
LPUNKNOWN
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicSignPostTrack
,
UnknownVtbl
,
iface
);
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
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