This is the mail archive of the cygwin-developers@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]

RE: Quick testfeedback...


What would be most useful (more useful than tryentercritical section in
some ways) would be
ReleaseCriticalSectionAndWait

AFAIK SignalObjectAndWait won't signal a CriticalSection, so we have a
race in pthread_cond_timedwait. (pthread_cond_wait is a wrapper around
timedwait).

That would mean that condition variables don't need to use real mutex's
to prevent races, and allow the current speed to be kept. (On my todo is
to drop cond variables back to using win32mutex's because of this).

TryEnterCriticalSection would be good of course, but without
ReleaseCriticalSectionAndWait or SignalObjectAndWait it will suffer the
same race forever, unless I can find some way to protect the
release+wait without utilising a syncronisation object :]. Mind you, on
a single CPU it's much harder to trigger such races than multiCPU.

Rob

> -----Original Message-----
> From: Christopher Faylor [mailto:cgf@redhat.com]
> Sent: Thursday, September 13, 2001 10:39 AM
> To: cygwin-developers@cygwin.com
> Subject: Re: Quick testfeedback...
> 
> 
> On Thu, Sep 13, 2001 at 08:46:41AM +1000, Robert Collins wrote:
> >On Thu, 2001-09-13 at 03:23, Christopher Faylor wrote:
> >> I *am* concerned about YA performance hit on Windows 9x, 
> though.  I'd like
> >> to avoid that if possible.
> >
> >No hit, its been like it is now since day 1. (Well actually there was
> >the process wide mutex serialisation when I first started 
> hacking at it,
> >but thats long gone).
> >
> >I just had the opportunity to make NT *faster*.
> 
> I noticed.  It's noticeably faster.
> 
> In fact, for some reason, cygwin *feels* faster now.  It 
> seems to start
> up zsh much more quickly.
> 
> I"m wondering if this is, in part, due to the use of critical sections
> in reading /etc/passwd.  I can't believe that it would have 
> that noticeable
> an effect but I don't know what else to attribute it to.  It 
> seems faster
> than 1.3.2.
> 
> I guess I just worry about the potential for cygwin mailing 
> list whines
> about slowness on 9x.  Maybe I'm getting overly sensitve to that.  :-)
> 
> And, getting our own implementation of TryEnterCriticalSection is
> something I'd always wanted to try.
> 
> cgf
> 


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