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
8a8ee786
Commit
8a8ee786
authored
Sep 17, 2004
by
Robert Reif
Committed by
Alexandre Julliard
Sep 17, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup reference counting.
AddRef and Release return ULONG.
parent
873e5bfe
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
46 deletions
+19
-46
buffer.c
dlls/dsound/buffer.c
+14
-26
capture.c
dlls/dsound/capture.c
+1
-1
primary.c
dlls/dsound/primary.c
+2
-2
propset.c
dlls/dsound/propset.c
+0
-1
sound3d.c
dlls/dsound/sound3d.c
+2
-16
No files found.
dlls/dsound/buffer.c
View file @
8a8ee786
...
...
@@ -68,17 +68,16 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_QueryInterface(
return
IDirectSoundBuffer_QueryInterface
((
LPDIRECTSOUNDBUFFER
)
This
->
dsb
,
riid
,
ppobj
);
}
static
ULONG
WINAPI
IDirectSoundNotifyImpl_AddRef
(
LPDIRECTSOUNDNOTIFY
iface
)
{
static
ULONG
WINAPI
IDirectSoundNotifyImpl_AddRef
(
LPDIRECTSOUNDNOTIFY
iface
)
{
IDirectSoundNotifyImpl
*
This
=
(
IDirectSoundNotifyImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
ULONG
WINAPI
IDirectSoundNotifyImpl_Release
(
LPDIRECTSOUNDNOTIFY
iface
)
{
IDirectSoundNotifyImpl
*
This
=
(
IDirectSoundNotifyImpl
*
)
iface
;
DWORD
ref
;
ULONG
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
...
...
@@ -367,28 +366,23 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Stop(LPDIRECTSOUNDBUFFER8 iface)
return
hres
;
}
static
DWORD
WINAPI
IDirectSoundBufferImpl_AddRef
(
LPDIRECTSOUNDBUFFER8
iface
)
{
static
ULONG
WINAPI
IDirectSoundBufferImpl_AddRef
(
LPDIRECTSOUNDBUFFER8
iface
)
{
IDirectSoundBufferImpl
*
This
=
(
IDirectSoundBufferImpl
*
)
iface
;
DWORD
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ref
=
InterlockedIncrement
(
&
(
This
->
ref
));
if
(
!
ref
)
{
FIXME
(
"thread-safety alert! AddRef-ing with a zero refcount!
\n
"
);
}
return
ref
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
DWORD
WINAPI
IDirectSoundBufferImpl_Release
(
LPDIRECTSOUNDBUFFER8
iface
)
static
ULONG
WINAPI
IDirectSoundBufferImpl_Release
(
LPDIRECTSOUNDBUFFER8
iface
)
{
IDirectSoundBufferImpl
*
This
=
(
IDirectSoundBufferImpl
*
)
iface
;
DWORD
ref
;
ULONG
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ref
=
InterlockedDecrement
(
&
(
This
->
ref
));
if
(
ref
)
return
ref
;
if
(
ref
)
return
ref
;
DSOUND_RemoveBuffer
(
This
->
dsound
,
This
);
...
...
@@ -1285,23 +1279,17 @@ static HRESULT WINAPI SecondaryBufferImpl_QueryInterface(
return
IDirectSoundBufferImpl_QueryInterface
((
LPDIRECTSOUNDBUFFER8
)
This
->
dsb
,
riid
,
ppobj
);
}
static
DWORD
WINAPI
SecondaryBufferImpl_AddRef
(
LPDIRECTSOUNDBUFFER8
iface
)
static
ULONG
WINAPI
SecondaryBufferImpl_AddRef
(
LPDIRECTSOUNDBUFFER8
iface
)
{
IDirectSoundBufferImpl
*
This
=
(
IDirectSoundBufferImpl
*
)
iface
;
DWORD
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ref
=
InterlockedIncrement
(
&
(
This
->
ref
));
if
(
!
ref
)
{
FIXME
(
"thread-safety alert! AddRef-ing with a zero refcount!
\n
"
);
}
return
ref
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
DWORD
WINAPI
SecondaryBufferImpl_Release
(
LPDIRECTSOUNDBUFFER8
iface
)
static
ULONG
WINAPI
SecondaryBufferImpl_Release
(
LPDIRECTSOUNDBUFFER8
iface
)
{
IDirectSoundBufferImpl
*
This
=
(
IDirectSoundBufferImpl
*
)
iface
;
DWORD
ref
;
ULONG
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ref
=
InterlockedDecrement
(
&
(
This
->
ref
));
...
...
dlls/dsound/capture.c
View file @
8a8ee786
...
...
@@ -780,7 +780,7 @@ static ULONG WINAPI IDirectSoundCaptureNotifyImpl_AddRef(LPDIRECTSOUNDNOTIFY ifa
static
ULONG
WINAPI
IDirectSoundCaptureNotifyImpl_Release
(
LPDIRECTSOUNDNOTIFY
iface
)
{
IDirectSoundCaptureNotifyImpl
*
This
=
(
IDirectSoundCaptureNotifyImpl
*
)
iface
;
DWORD
ref
;
ULONG
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
...
...
dlls/dsound/primary.c
View file @
8a8ee786
...
...
@@ -578,13 +578,13 @@ static HRESULT WINAPI PrimaryBufferImpl_Stop(LPDIRECTSOUNDBUFFER8 iface)
return
DS_OK
;
}
static
DWORD
WINAPI
PrimaryBufferImpl_AddRef
(
LPDIRECTSOUNDBUFFER8
iface
)
{
static
ULONG
WINAPI
PrimaryBufferImpl_AddRef
(
LPDIRECTSOUNDBUFFER8
iface
)
{
PrimaryBufferImpl
*
This
=
(
PrimaryBufferImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
DWORD
WINAPI
PrimaryBufferImpl_Release
(
LPDIRECTSOUNDBUFFER8
iface
)
{
static
ULONG
WINAPI
PrimaryBufferImpl_Release
(
LPDIRECTSOUNDBUFFER8
iface
)
{
PrimaryBufferImpl
*
This
=
(
PrimaryBufferImpl
*
)
iface
;
DWORD
ref
;
...
...
dlls/dsound/propset.c
View file @
8a8ee786
...
...
@@ -246,7 +246,6 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_QueryInterface(
static
ULONG
WINAPI
IKsPrivatePropertySetImpl_AddRef
(
LPKSPROPERTYSET
iface
)
{
IKsPrivatePropertySetImpl
*
This
=
(
IKsPrivatePropertySetImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
...
...
dlls/dsound/sound3d.c
View file @
8a8ee786
...
...
@@ -379,14 +379,8 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_QueryInterface(
static
ULONG
WINAPI
IDirectSound3DBufferImpl_AddRef
(
LPDIRECTSOUND3DBUFFER
iface
)
{
IDirectSound3DBufferImpl
*
This
=
(
IDirectSound3DBufferImpl
*
)
iface
;
ULONG
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ref
=
InterlockedIncrement
(
&
(
This
->
ref
));
if
(
!
ref
)
{
FIXME
(
"thread-safety alert! AddRef-ing with a zero refcount!
\n
"
);
}
return
ref
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
ULONG
WINAPI
IDirectSound3DBufferImpl_Release
(
LPDIRECTSOUND3DBUFFER
iface
)
...
...
@@ -822,16 +816,8 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_QueryInterface(
static
ULONG
WINAPI
IDirectSound3DListenerImpl_AddRef
(
LPDIRECTSOUND3DLISTENER
iface
)
{
IDirectSound3DListenerImpl
*
This
=
(
IDirectSound3DListenerImpl
*
)
iface
;
ULONG
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ref
=
InterlockedIncrement
(
&
(
This
->
ref
));
if
(
!
ref
)
{
FIXME
(
"thread-safety alert! AddRef-ing with a zero refcount!
\n
"
);
}
return
ref
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
ULONG
WINAPI
IDirectSound3DListenerImpl_Release
(
LPDIRECTSOUND3DLISTENER
iface
)
...
...
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