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: 1.3.4?


> -----Original Message-----
> From: Matt [mailto:matt@use.net]

> MSDN says MsgWaitForMultipleObjects can be used instead of
> SignalObjectAndWait in certain circumstances. While it doesn't support
> Critical Sections, it is supported on win9x.

Thanks, however I already looked at this and it's not appropriate. The
problem is not windows 95 support - it's a race between exiting the
protected area and waiting on the event object.

SignalObjectAndWait solves that by being atomic with respect to _both_
the ibject to signal and object to wait on.

MsgWaitFor... does not signal an object, so the race still exists.

The NT function does not support Critical sections either, which is why
this race now exists for NT as well as for 95 (which doesn't have the
SignalObjectAndWait function at all). Mutex's are much slower than
Critical sections, so this _is_ a trade off.

Basically, AFAICT, MS were still learning how to program preemptively on
95.

Rob


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