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: Matthew Heaney Subject: Re: D.10 Date: 1999/04/13 Message-ID: #1/1 X-Deja-AN: 465749402 References: <7eu6ud$8lc$1@bgtnsc03.worldnet.att.net> NNTP-Posting-Date: Mon, 12 Apr 1999 21:15:22 PDT Newsgroups: comp.lang.ada Date: 1999-04-13T00:00:00+00:00 List-Id: "James S. Rogers" writes: > Matthew Heaney wrote in message ... > >Paragraph D.10 (7) states that > > > >"The operations Set_True and Set_False are atomic with respect to each > >other and with respect to Suspend_Until_True..." > > > > > >Q: Is Suspend_Until_True atomic with respect to Suspend_Until_True? > > > >In 12.3.1 of Burns and Wellings, they state that a semaphore can be used > >to program mutual exclusion between two tasks, like this: > > > > Why not implement this as a protected object instead of a task. Protected > operations are guaranteed to be atomic. I am exploring primitive (but potentially more efficient) ways to synchronize tasks. The RM is ambiguous. It doesn't say specifically that the suspension object can be shared this way (ie that Suspend_Until_True is atomic wrt other calls to Suspend_Until_True), but it doesn't say it can't be. I would like to know the specific intent of the language designers, and whether or not the algorithm in B&W is in fact legal.