[PATCH] new mutex implementation 2. posting

Christopher Faylor cgf@redhat.com
Fri Sep 20 08:47:00 GMT 2002

On Fri, Sep 20, 2002 at 10:46:15PM +1000, Robert Collins wrote:
>On Fri, 2002-09-20 at 22:43, Thomas Pfaff wrote:
>> On Fri, 20 Sep 2002, Robert Collins wrote:
>> > On Tue, 2002-09-17 at 19:34, Thomas Pfaff wrote:
>> >
>> > Thomas, the patch is incomplete.
>> >
>> > pthread_cond::TimedWait needs updating as well...
>> Yup, but it seems that this was broken on NT before i made my changes,
>> because it was never updated to use Critical Sections when they are
>> available.
>Uhmm, it was working for me :}. anyway, if you can make that consistent,
>I will apply the semaphore based mutex code. I'm not 100% behind it, I
>think we need to benchmark it, but lacking the facilities, I'm going to
>accept it and tune later.

I haven't been following very closely.  Is the reason why we are not using
critical sections that TryEnterCriticalSection isn't available anywhere?
If so, then we can probably fix that with some assembly programming.

Critical sections are *so* much faster than mutexes or semaphores that
it makes sense to use them if possible.

Or, maybe we're talking about something else entirely...


More information about the Cygwin-patches mailing list