comp.lang.ada
 help / color / mirror / Atom feed
From: "Dan'l Miller" <optikos@verizon.net>
Subject: Re: Kernel Syscall from Ada?
Date: Wed, 11 Jul 2018 18:32:28 -0700 (PDT)
Date: 2018-07-11T18:32:28-07:00	[thread overview]
Message-ID: <ed134e53-4058-4cef-83f0-5fc2251d9223@googlegroups.com> (raw)
In-Reply-To: <2048d6d6-04e2-4e2c-9483-e3769da59781@googlegroups.com>

On Thursday, June 23, 2016 at 3:36:21 AM UTC-5, Diogenes wrote:
> Is there a simple way to make a direct (Linux)Kernel syscall from Ada without using the system C library? i.e. Make a direct call as in Assembler?
> 
> I'm asking because I've found a way to strip about 80k from a statically linked executable by not including Interfaces.C in the runtime.
> 
> I've gotten my code to work reasonably well (no segfaults or memory errors) using inline Assembler. But it seems like there should be an Abstract or Generic "syscall" feature as part of the System library that we could use for doing our own Kernel calls. Same thing for the vDSO.
> 
> Any tips?
> 
> Diogenes

Well, coming at the topic top down from the momentum of ISO/IEEE standardization, for system calls in POSIX.2 (C API) there does exist an analogous POSIX.5 (Ada API).  Whenever possible this should be utilized (and extended/maintained where stale).
front-matter preview:
https://webstore.iec.ch/preview/info_isoiec14519%7Bed2.0%7Den.pdf
available for purchase in each major national standards body, such as for $232 in the USA:
https://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014519:2001&source=preview

Coming at the topic bottom up from Linux kernel space, the C-language system calls could be augmented with a wholesale rethink of all the system calls into Ada-speak as a new Ada-centric distribution of Linux.
https://www.kernel.org/doc/html/v4.10/process/adding-syscalls.html


  parent reply	other threads:[~2018-07-12  1:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23  8:36 Kernel Syscall from Ada? Diogenes
2016-06-23 10:58 ` Björn Lundin
2016-06-23 16:28   ` Per Sandberg
2016-06-23 22:18 ` Randy Brukardt
2018-07-12 19:07   ` Dan'l Miller
2018-07-12 20:59     ` Randy Brukardt
2016-06-24  1:13 ` Xavier Petit
2016-06-24 22:23 ` Florian Weimer
2018-07-11 22:38 ` alexgrantbenedict
2018-07-12  1:32 ` Dan'l Miller [this message]
2018-07-12  8:19   ` Lucretia
2018-07-12 15:27     ` Dan'l Miller
2018-07-12 17:27       ` Lucretia
replies disabled

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