Refcounting in dsound

Paul Vriens Paul.Vriens at
Mon Jan 24 08:42:34 CST 2005

On Mon, 2005-01-24 at 15:21, Dimitrie O. Paun wrote:
> On Mon, Jan 24, 2005 at 02:50:02PM +0100, Paul Vriens wrote:
> > Is there a need to clean (i.e. use Interlocked*) this up?
> I thought we've decided to have all mods go through
> Interlocked*, for consistency...
I already put something on wine-devel a few days ago, but here is a new

wine/server/object.c:    obj->refcount++;
wine/server/object.c:    if (!--obj->refcount)

and in dll's:

advapi32/crypt.c:       pProv->refcount++;
advapi32/crypt.c:       pProv->refcount--;
advapi32/service.c:    if (--hdr->ref_count)

dsound/buffer.c:                        This->buffer->ref--;
dsound/buffer.c:                This->buffer->ref--;
dsound/dsound.c:        dsb->buffer->ref++;

msi/table.c:    table->ref_count --;
msi/table.c:        if ( --t->ref_count )
msi/table.c:        (*ptable)->ref_count++;
msi/table.c:    (*ptable)->ref_count++;

Mike about msi:
I don't think so, handles are not COM objects and making MSI thread safe
(if it's not already) should be some other Janitorial task.

rsaenh/handle.c:    lpObject->refcount++;
rsaenh/handle.c:    pObject->refcount--;

setupapi/virtcopy.c:            vhstrlist[n]->refcount++;
setupapi/virtcopy.c:    vhstrlist[vhstr]->refcount--;

Mike about setupapi:

Included are the remarks (the only ones I got so far) from Mike Hearn.

So any suggestions/remarks? If not, I (or if somebody else beats me)
will produce patches for all of the above.



More information about the wine-devel mailing list