comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada versus Pascal
Date: Fri, 22 Oct 2021 17:47:59 +0200	[thread overview]
Message-ID: <skumfd$13l7$1@gioia.aioe.org> (raw)
In-Reply-To: itg2niFeqbnU1@mid.individual.net

On 2021-10-22 17:12, Niklas Holsti wrote:

> I'm not ldries46, but here is an answer: Ada standardizes _some_ 
> functions for which some other languages use "OS" services, principally 
> threading, which in Ada is the "tasking" feature. Indeed Ada tasking 
> works in the same way whichever OS is used, and also in the "bare 
> board", no-OS situation. This is very useful for developing 
> multi-threaded embedded SW, because the Ada tasking code can be tested 
> on desk-top workstations and then executed on the target system 
> unchanged. (and no "ifdefs").
> 
> But real operating systems (as opposed to simpler real-time kernels) 
> provide many services that are not standardized in Ada, for example 
> inter-process communication.

Ada 83 predates threads. Initially a task meant to be either scheduled 
internally or mapped onto system processes. It is not late now. One 
could allow the pragma Import for tasks (and protected objects) in order 
to communicate to an external process using rendezvous and protected 
actions.

> However, there are some rudiments:
> 
> - There is a standardized Ada interface (binding) to POSIX services. 
> This is implemented in an Ada library called Florist. If you find or 
> make a Florist implementation for the OSes you use, your Ada program can 
> use the same OS service interfaces on all those OSes.
> 
> - The gcc-based Ada compiler GNAT comes with a GNAT-specific library 
> that provides some OS services with the same Ada API on any OS that GNAT 
> supports. This includes some IPC, but I don't know exactly how far that 
> goes, and the library may of course change from one GNAT version to the 
> next.

It provides sockets and serial I/O, one or both are vital for many 
applications.

> - There is an Ada library called Win32Ada that provides an extensive set 
> of Microsoft Windows services, but it is a "thin binding" meaning that 
> even the API is Windows-specific.

- There is the annex E providing RPC and shared objects. Unfortunately 
it is very vague and underdocumented. I failed to provide an 
implementation of for a GNAT compiler.

- The simple components library provides inter-process communication 
primitives: mutexes, events, streams, pools, RPCs etc.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2021-10-22 15:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22  3:29 Ada versus Pascal 711 Spooky Mart
2021-10-22  6:18 ` ldries46
2021-10-22  9:59   ` 711 Spooky Mart
2021-10-22 15:12     ` Niklas Holsti
2021-10-22 15:47       ` Dmitry A. Kazakov [this message]
2021-10-23  7:13       ` ldries46
2021-10-23 14:08       ` Simon Wright
2021-10-22  6:40 ` Paul Rubin
2021-10-22  8:57 ` Niklas Holsti
2021-10-22 11:49 ` Jeffrey R.Carter
2021-10-22 17:05 ` Dennis Lee Bieber
2021-10-23  0:29   ` Paul Rubin
2021-10-23  1:17     ` Randy Brukardt
2021-10-23 17:24     ` Dennis Lee Bieber
2021-10-24  7:04       ` J-P. Rosen
2021-10-22 20:00 ` Gautier write-only address
2021-10-24  4:33 ` Jerry
2021-10-24  6:32   ` ldries46
2021-10-24 16:51   ` Gautier write-only address
2021-10-24 23:24     ` 711 Spooky Mart
2021-10-25  8:23       ` Niklas Holsti
2021-10-25  8:40         ` Luke A. Guest
2021-10-25 13:34           ` Luke A. Guest
replies disabled

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