comp.lang.ada
 help / color / mirror / Atom feed
From: "Luke A. Guest" <laguest@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk>
Subject: Re: Ada runtime and Linux Kernel Module
Date: Wed, 24 Mar 2004 21:42:57 +0000
Date: 2004-03-24T21:42:57+00:00	[thread overview]
Message-ID: <pan.2004.03.24.21.42.56.266064@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk> (raw)
In-Reply-To: a7a482f9.0403241330.368af948@posting.google.com

On Wed, 24 Mar 2004 13:30:30 -0800, Rohan wrote:

> Hello!
> 
> I am in the very early stages of looking at writing a Linux kernel
> module in ada for a University project.  I have looked around and it
> seems to be possible, if tricky.

The only thing you need is the system.ads file. The rest you don't need
and won't really be able to use for OS level programming.

Another feature you *will* require is the use of "pragma
Restrictions(No_Elaboration_Code);" to force the compiler not to generate
things like functions for arrays, i.e. conversion functions for indexing.

Also, use the -gnatdg switch to see what GNAT is generating and you'll see
what I mean.

> "If you have the time, you can always copy some of the standard Ada
> packages to a separate directory and compile them into your GNORT
> project, effectively creating your own small, custom run-time system."

As I remember it, GNORT doesn't exist anymore.

I also created a gnat.adc file with the following inside it:

pragma No_Run_Time;
pragma Restrictions(No_Exceptions);

That should be all you need.

Luke.




  reply	other threads:[~2004-03-24 21:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-24 21:30 Ada runtime and Linux Kernel Module Rohan
2004-03-24 21:42 ` Luke A. Guest [this message]
2004-03-25  0:39 ` Jeff C,
2004-03-25 20:06 ` Stephane Carrez
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox