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,50b338b69088ffa3 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: Signals from ethernet card driver Date: 1999/04/30 Message-ID: #1/1 X-Deja-AN: 472573746 References: <3728E864.C1BAB081@res.raytheon.com> NNTP-Posting-Date: Thu, 29 Apr 1999 22:43:33 PDT Newsgroups: comp.lang.ada Date: 1999-04-30T00:00:00+00:00 List-Id: askeya writes: > I am trying to get a driver to signal my Ada program when a TCP/IP > message arrives over an ethernet on a Sun running Solaris 2.7. It would > be great if the signal would act as a task rendezvous. I have done this > on a VAX with VMS using Starlet, but don't have a clue if it can be done > on a Sun with Solaris. > > First question: can the driver send a signal when a message arrives? I'm not very driver-literate, but does the client do the I/O using a file descriptor? Won't SIGIO (SIGPOLL) work? > Second question: In theory, can I receive that signal in my program? Try declaring an interrupt handler to catch the signal SIGIO (SIGPOLL). > Third question (if you feel ambitious): In general, how? In Ada95, you declare an interrupt handler as a protected procedure, and bind it to a signal via pragma Interrupt_Handler. Although it's officially obsolescent, you can also bind an interrupt handler to a task entry.