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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2ef9ab4638027d85 X-Google-Attributes: gid103376,public From: Rosen.Adalog@wanadoo.fr (J-P. Rosen) Subject: Re: Uninterruptible (atomic) operation? Date: 1996/12/13 Message-ID: <58r1ed$lem@hetre.wanadoo.fr>#1/1 X-Deja-AN: 203873652 references: <9612111939.AA14087@most> organization: Adalog reply-to: Rosen.Adalog@wanadoo.fr newsgroups: comp.lang.ada Date: 1996-12-13T00:00:00+00:00 List-Id: "W. Wesley Groleau (Wes)" wrote: >2. An Ada 83 (which I'm stuck with) solution to (1) may not work if >the reader and the writer are parts of independent Unix processes, and >the shared object is created by system calls. At first, I thought of >the solution where the item shared is a pointer to the object, and >the writer could overwrite the pointer atomically, after non-atomically >updating/creating a new object. Problem there is that the shared memory >is guaranteed to be the same address for all processes using it. But >if it contains a pointer, the object pointed to in process X may be at >a virtual address that is used for something else by process Y. IF you are running on a mono-processor, you can have the update done by a surrogate task that runs at highest priority level. +------------------------------------o-------------------------------------+ | J-P. Rosen | Rosen.Adalog@wanadoo.fr | | ADALOG - 27 avenue de Verdun | Tel: +33 1 46 45 51 12 | | 92170 Vanves - FRANCE | Fax: +33 1 46 45 52 49 | +------------------------------------o-------------------------------------+