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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,73975695cdfcb86f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.227.230 with SMTP id sd6mr268739pbc.8.1333569350777; Wed, 04 Apr 2012 12:55:50 -0700 (PDT) Path: r9ni18724pbh.0!nntp.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Dispatching callback handed over to C Date: Wed, 04 Apr 2012 20:55:50 +0100 Organization: A noiseless patient Spider Message-ID: References: <6fb83c74-b2a4-4ae8-9c89-d755b737198f@v22g2000vby.googlegroups.com> <85d1ad51-c02b-44fa-87b6-02aa1d8ba1b2@x17g2000vba.googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="6640"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182bwM6MlRojkJz8oFHhtafnIMw2ut3/Cc=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:fIoP9mivoLPQplI5HSwP2JKsTE4= sha1:tXJrxYs1yy1mhfATDKjlkTgTDEk= Content-Type: text/plain; charset=us-ascii Date: 2012-04-04T20:55:50+01:00 List-Id: Natasha Kerensikova writes: > That was another question I had in mind with that mechanism: I'm giving > to C a reference to Ada data in one call (namely Event_New) but it gets > used later, in another call (to Event_Base_Dispatch) which seeming does > not involve the data at all. > > Should go to some extra steps (but which?) to warn the compiler that my > Event object can change during Event_Base_Dispatch call despite that > call not involving any Event object? > Or maybe just marking the Event object as aliased is enough? Volatile, perhaps?