[ros-dev] Re: [ros-diffs] [ion] 12774: Add more Critical Section Debug Data and fix two bugs.

Rob Shearman rob at codeweavers.com
Tue Jan 4 07:58:45 CET 2005

Alex Ionescu wrote:

> Joseph Galbraith wrote:
>> ion at svn.reactos.com wrote:
>>> +    DPRINT("Waiting on Critical Section: %x\n", CriticalSection);
>>> +    if (CriticalSection->DebugInfo) 
>>> CriticalSection->DebugInfo->EntryCount++;
>> I'm just reading the diffs here, so I could be way
>> off, but shouldn't this use an InterlockedIncrement...
>> otherwise you could get a context switch between
>> in the middle of your increment to another threading
>> attempting to lock the critical section.  It is just
>> debug information, but still...
> I suppose that makes sense... I'll look into it.
>> Also, looking at the rest of the code, I notice that
>> spin count doesn't appear to be implemented.
> No, not as of now. It was based on WINE code which doesn't implement 
> this yet (AFAIK).

Yes it does. 

> I have been optimizing it and adding more feature to make it stabler, 
> so spin lock support for MP builds was on my list. Thanks for your 
> patch... I'll take a look at it.

It would be good if someone could implement the stack backtrace capture 
functions as we could then remove critsec debugging hacks from all over 
the wine tree.


More information about the Ros-dev mailing list