From: Simon Wright <simon@pushface.org>
Subject: Re: Ada Library, called, returns and continues ?
Date: Mon, 17 Dec 2012 17:08:20 +0000
Date: 2012-12-17T17:08:20+00:00 [thread overview]
Message-ID: <lytxrky5bv.fsf@pushface.org> (raw)
In-Reply-To: a73b16fa-27d2-4946-bd04-11b3691408f0@googlegroups.com
Patrick <patrick@spellingbeewinnars.org> writes:
> If a protected object and it's entries are bound to a C/C++
> application with it's own main, do you think the Ada threads will
> begin when the C main is called or would I need to create an
> initialization for them? If they just started, main C could call an
> entry or If I used a protected record I could also access this as a
> struct and retrieve data this way. Do you think I could send data back
> and forth through the protected record?
[1] tells how to bind (how to invoke gnatbind) for a non-Ada main
program; this generates the necessary Ada elaboration code, and your C
calls "adainit" to do the elaboration, start tasks etc. There's also an
"adafinal", which I've never had occasion to call, and I believe you can
get GNAT to use a different name if necessary.
C can't call POs or task entries directly, you'd need to write Ada
subprograms to do that and arrange to call them from the C.
[1] http://docs.adacore.com/gnat-unw-docs/html/gnat_ugn_5.html#SEC70
next prev parent reply other threads:[~2012-12-17 17:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-16 19:21 Ada Library, called, returns and continues ? Patrick
2012-12-16 19:51 ` Simon Wright
2012-12-16 20:26 ` Dmitry A. Kazakov
2012-12-16 23:13 ` Patrick
2012-12-17 8:59 ` Dmitry A. Kazakov
2012-12-17 15:58 ` Patrick
2012-12-17 17:08 ` Simon Wright [this message]
2012-12-17 17:43 ` Patrick
2012-12-17 18:09 ` Dmitry A. Kazakov
2012-12-17 19:41 ` Patrick
2012-12-17 21:26 ` Dmitry A. Kazakov
2012-12-17 23:42 ` Patrick
2012-12-18 0:30 ` Randy Brukardt
2012-12-18 1:36 ` Patrick
2012-12-18 23:10 ` Randy Brukardt
2012-12-18 9:17 ` Dmitry A. Kazakov
2012-12-18 15:00 ` Patrick
2012-12-18 15:37 ` Dmitry A. Kazakov
2012-12-18 16:14 ` Patrick
2012-12-18 17:25 ` Dmitry A. Kazakov
2012-12-18 16:50 ` Robert A Duff
[not found] ` <2nr1d89tvkc3h0dvcd62tpsf1vujsdb09o@invalid.netcom.com>
2012-12-18 23:54 ` Patrick
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox