[PATCH] new mutex implementation 2. posting
Robert Collins
rbcollins@cygwin.com
Sat Sep 21 19:02:00 GMT 2002
On Sat, 2002-09-21 at 01:47, Christopher Faylor wrote:
> 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.
Thats a factor, yes.
> 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...
Well there are two things. Thomas's work gives use recursive and error
checking mutexes, which aren't currently supported. He also points out
that semaphores leverage critical sections on NT, so should be ~ in
speed.
>From my POV, we haven't benchmarked his work enough to really tell, BUT
- critical sections don't scale well anyway, certainly not to MP
environments (there is doco on this somewhere).
We could look at having both classes implemented and doing some testing.
Hmm.
In fact, given that we object based, we probably should subclass
pthread_mutex anyway for clarity with the different forms of mutexs.
Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020921/db6c0015/attachment.sig>
More information about the Cygwin-patches
mailing list