Re: [1/9] DDraw: Make IDirectDrawImpl thread safe
22 Aug
2006
22 Aug
'06
9:50 a.m.
Stefan Dösinger <stefandoesinger(a)gmx.at> writes:
@@ -245,11 +252,12 @@ void IDirectDrawImpl_Destroy(IDirectDrawImpl *This) { IDirectDrawImpl *prev; + DDOBJ_LOCK(This);
You shouldn't need locking in Destroy, if the refcount is zero no one else can be using the object.
for(prev = ddraw_list; prev; prev = prev->next) + { if(prev->next == This) break; + }
if(prev) + { + DDOBJ_LOCK(prev); prev->next = This->next; + DDOBJ_UNLOCK(prev); + }
You can't lock just one object, you have the protect the whole list. -- Alexandre Julliard julliard(a)winehq.org
7055
Age (days ago)
7055
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard