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
ec722448
Commit
ec722448
authored
Sep 14, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 14, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Interlocked* functions in AddRef and Release.
parent
8ea4fffb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
mlang.c
dlls/mlang/mlang.c
+8
-8
No files found.
dlls/mlang/mlang.c
View file @
ec722448
...
...
@@ -624,13 +624,13 @@ MLANGCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
static
ULONG
WINAPI
MLANGCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
MLANGCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
)
;
if
(
ref
==
0
)
{
...
...
@@ -733,12 +733,12 @@ typedef struct tagMLang_impl
static
ULONG
WINAPI
MLang_AddRef
(
MLang_impl
*
This
)
{
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
MLang_Release
(
MLang_impl
*
This
)
{
ULONG
ref
=
--
This
->
ref
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
)
;
TRACE
(
"%p ref = %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
...
...
@@ -823,14 +823,14 @@ static ULONG WINAPI fnIEnumCodePage_AddRef(
IEnumCodePage
*
iface
)
{
ICOM_THIS_MULTI
(
EnumCodePage_impl
,
vtbl_IEnumCodePage
,
iface
);
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
fnIEnumCodePage_Release
(
IEnumCodePage
*
iface
)
{
ICOM_THIS_MULTI
(
EnumCodePage_impl
,
vtbl_IEnumCodePage
,
iface
);
ULONG
ref
=
--
This
->
ref
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
)
;
TRACE
(
"%p ref = %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
...
...
@@ -1009,14 +1009,14 @@ static ULONG WINAPI fnIEnumScript_AddRef(
IEnumScript
*
iface
)
{
ICOM_THIS_MULTI
(
EnumScript_impl
,
vtbl_IEnumScript
,
iface
);
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
fnIEnumScript_Release
(
IEnumScript
*
iface
)
{
ICOM_THIS_MULTI
(
EnumScript_impl
,
vtbl_IEnumScript
,
iface
);
ULONG
ref
=
--
This
->
ref
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
)
;
TRACE
(
"%p ref = %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
...
...
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