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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,34e28efa1a88ae84 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!news.motzarella.org!motzarella.org!not-for-mail From: =?ISO-8859-1?Q?S=E9bastien?= Newsgroups: comp.lang.ada Subject: Re: Access procedure to pointer Date: Wed, 28 May 2008 15:29:48 +0000 Organization: A noiseless patient Spider Message-ID: References: <483C48B5.9060303@gmail.com> <483D209D.5010408@gmail.com> <483D72F0.9090308@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: feeder.motzarella.org U2FsdGVkX18W0iwfarUrCvVue24Bn2tbG8zj9pFZ3hNn2cZnH9OTx5F8C3CGXjcrE4/hW7jQA8P64AMP+WxpdP5Rht8BrQaSRNJBgJd62Ekb8c+wOGkqgqMNrAmznJwDLgikvYjaMi2iy59j9oMxxg== X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Wed, 28 May 2008 15:29:49 +0000 (UTC) In-Reply-To: X-Auth-Sender: U2FsdGVkX1+fbiP5J26cOROnRT3TI3L+cM5Mn0dG6n91QGUZx2B0BQ== Cancel-Lock: sha1:muYNzJXdfusxF9WcEUv49x+BUHQ= User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) Xref: g2news1.google.com comp.lang.ada:427 Date: 2008-05-28T15:29:48+00:00 List-Id: > 2) It's not documented, and not intuitive, no example nothing to start. > > As a matter of fact, the first problem is solved ;-), if you any help > about the second problem, I'll be happy to use standard package instead > of mine. I answer to my own question. Here is a sample code it works fine: package AdaInterrupsTest is protected Test is procedure TestHandler; pragma Interrupt_Handler(TestHandler); end Test; end AdaInterrupsTest; package body AdaInterrupsTest is protected body Test is procedure TestHandler is begin Put_Line("Hello from test"); end TestHandler; end Test; end AdaInterrupsTest; procedure TestAdaInterrupt is use AdaInterrupsTest; use Ada.Interrupts; use Ada.Interrupts.Names; begin Attach_Handler(Test.TestHandler'Access, SIGHUP); delay 30.0; end TestAdaInterrupt; Then get the pid before the end of the delay and then kill -1 give me "Hello from test" on stdout Thanks about the tip Sebastien