delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/09/24/01:42:48

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Subject: RE: 1.3.4?
MIME-Version: 1.0
Date: Mon, 24 Sep 2001 15:51:23 +1000
content-class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0
Message-ID: <EA18B9FA0FE4194AA2B4CDB91F73C0EF7A35@itdomain002.itdomain.net.au>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: 1.3.4?
Thread-Index: AcFEu+H9VHUXsfzDRBSgMpwBL1Y6SwAABDHg
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: "Matt" <matt AT use DOT net>
Cc: <cygwin-developers AT cygwin DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id BAA12253

> -----Original Message-----
> From: Matt [mailto:matt AT use DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019