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.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,da490d4dc6f0a628 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-05 07:01:57 PST Path: supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Ted Dennison Newsgroups: comp.lang.ada Subject: Re: Interrupts service Date: Fri, 05 Jan 2001 14:49:14 GMT Organization: Deja.com Message-ID: <934mt8$i9c$1@nnrp1.deja.com> References: <934ecj$pdn$1@news.tpi.pl> NNTP-Posting-Host: 204.48.27.130 X-Article-Creation-Date: Fri Jan 05 14:49:14 2001 GMT X-Http-User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001207 X-Http-Proxy: 1.0 x54.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 X-MyDeja-Info: XMYDJUIDtedennison Xref: supernews.google.com comp.lang.ada:3689 Date: 2001-01-05T14:49:14+00:00 List-Id: In article <934ecj$pdn$1@news.tpi.pl>, "Szygula" wrote: > WHAT'S WRONG IN THIS PROGRAM ??? > > procedure program is > ... > protected type Sygnal(p:Interrupt_ID)is > > procedure Steruj; > pragma Interrupt_handler(Steruj); > pragma Attach_Handler(Steruj,p); > end Sygnal; Well, for one thing, the LRM says that the protected type that contains those pragmas must be declared at the library level (in a package spec), while you have it declared within a procedure. I'd be suprised if your compiler didn't tell you this too. For another, I don't see you creating any objects of type "Sygnal". (Those will also have to be declared at the library level.) A type declaration by itself doesn't really do much of anything. Thirdly, I don't think you need the Interrup_Handler pragma the way you have things set up, but it probably won't hurt anything either. > > protected body sygnal is > > procedure Steruj is > begin > Put("przerwanie"); > end steruj; Fourthly, I believe Text_IO operations are "potentially blocking", and therefore are forbidden within protected operations. -- T.E.D. http://www.telepath.com/~dennison/Ted/TED.html Sent via Deja.com http://www.deja.com/