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,751584f55705ddb7 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Ada is almost useless in embedded systems Date: 1996/02/17 Message-ID: #1/1 X-Deja-AN: 139804239 references: <823906039.22113@assen.demon.co.uk> <823965654.4500@assen.demon.co.uk> <824165619.14894@assen.demon.co.uk> <824259217.26321@assen.demon.co.uk> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-02-17T00:00:00+00:00 List-Id: John McCabe said "If you check the detail of pragma shared, I think you'll find this does not provide the same facilities as the C 'volatile' attribute. I have checked this according to my compiler manual, so I do know what I'm talking about here. Also, as I've mentioned elsewhere, I know nothing about Ada 95, all my comments are purely Ada 83." This is wrong, pragma shared corresponds to pragma Atomic in Ada 95, not to pragma Volatile (and the volatile keyword in C). Volatile does not require atomic access and can be applied to anything. Atomic (Shared) can only be applied to objects for which atomic access can be guaranteed, which is likely to be very restrictive. There is no equivalent of pragma Volatile in Ada 83.