[ros-dev] Re: [ros-svn] [hbirr] 17538: Fixed a bug in RtlLeaveCriticalSection. We have only to signal the event if someone waits on it.

Thomas Weidenmueller w3seek at reactos.com
Thu Aug 25 15:30:58 CEST 2005


Hartmut Birr wrote:
> I think that the fix is correct. If a critical section is entered and
> left only once. The leave call signals the event. The section is enter
> again from two different threads. The first thread gets the section
> because the lock count is -1, the second thread must wait on the event
> which is already set. Now two different threads owns the section. If a
> thread enter the section recursive, only the last leave call will set
> the event if someone else waits on the event.

Yes, you're right. I'm sorry ;)

Best Regards,
Thomas


More information about the Ros-dev mailing list