From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fc232b1f37897ed0 X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: D.10 Date: 1999/04/13 Message-ID: #1/1 X-Deja-AN: 465911668 Sender: bobduff@world.std.com (Robert A Duff) References: <7eu6ud$8lc$1@bgtnsc03.worldnet.att.net> <7evbm6$oto$1@nnrp1.dejanews.com> <7evc2d$p9i$1@nnrp1.dejanews.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1999-04-13T00:00:00+00:00 List-Id: Matthew Heaney writes: > Is an invocation of operation Suspend_Until_True on a suspension object > by one task atomic with respect to an invocation of Suspend_Until_True > on the same suspension object by another task? Well, the RM doesn't say it is, so I guess it isn't. I admit the RM isn't crystal clear on this point. The *intent* is that this feature would be used in a situation where a given suspension object is "owned" by a single task, and only that task does Suspend_Until_True. That task publishes a handle on the suspension object to the rest of the world, and other tasks can call Set_True to wake it up. I would also expect that only the owner does Set_False (presumably before "publishing"). Actually, it is set False by default initialization, so you don't need to ever call Set_False, unless you want to reuse the same suspension object. The example you gave from Burns and Wellings seems weird to me, whatever the RM says. The run-time system I'm currently working on (for the ADI SHARC DSP chip) has an implementation (just a few instructions) that will make the example work. But it wouldn't surprise me if other implementations have a race condition. - Bob -- Change robert to bob to get my real email address. Sorry.