This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] new mutex implementation 2. posting


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...

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]