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,a99a6d8aa49592d5 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newspeer1.se.telia.net!se.telia.net!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn_Persson?= User-Agent: Thunderbird 1.5.0.4 (X11/20060614) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: call procedure in Linux-Ada-module from "normal" program References: <44edd4d1$1@news.broadpark.no> In-Reply-To: <44edd4d1$1@news.broadpark.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <58mHg.14206$E02.5134@newsb.telia.net> Date: Thu, 24 Aug 2006 18:22:57 GMT NNTP-Posting-Host: 83.250.106.238 X-Complaints-To: abuse@telia.com X-Trace: newsb.telia.net 1156443777 83.250.106.238 (Thu, 24 Aug 2006 20:22:57 CEST) NNTP-Posting-Date: Thu, 24 Aug 2006 20:22:57 CEST Organization: Telia Internet Xref: g2news2.google.com comp.lang.ada:6350 Date: 2006-08-24T18:22:57+00:00 List-Id: Frank wrote: > I've been tinkering with modules by using Ada. > The module compiles, and I manage to do insmod on it. > The symbols appears in ksyms; like "some_call_me". > > Now I wish to call "some_call_me" from the test program (3) - is that > possible? There are a number of ways to communicate with Linux, but you can't just call a procedure like that. That's true for all programming languages. A kernel isn't just another library. I suggest that you look around for information on system calls, trap instructions and IOCTLs. You'll probably only find examples in C, but when you know how to do what you want in C, I'm sure someone here can help you translate it to Ada. -- Bj�rn Persson PGP key A88682FD omb jor ers @sv ge. r o.b n.p son eri nu