comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: right compilation unit for C as main?
Date: Tue, 18 Dec 2012 23:04:48 +0000 (UTC)
Date: 2012-12-18T23:04:48+00:00	[thread overview]
Message-ID: <kaqsqg$1cl$2@dont-email.me> (raw)
In-Reply-To: wcc4njjtha3.fsf@shell01.TheWorld.com

On Tue, 18 Dec 2012 12:13:40 -0500, Robert A Duff wrote:

> Brian Drummond <brian@shapes.demon.co.uk> writes:
> 
>> adainit() should not block! It should set the environment up for Ada
>> and return to your C main program. Which will then call an ...ahhh, Ada
>> procedure which WILL block because the tasks it creates cannot outlive
>> it...
> 
> That's true only if it declares objects containing tasks.
> If it allocates objects containing tasks via "new",
> with the access type declared at library level, then the tasks can
> outlive their creator.

Thanks for the correction; it may give Patrick another option. (Though 
declaring tasks within the Ada procedure looks easier to get right - at 
least for a relative beginner like myself.

- Brian



  reply	other threads:[~2012-12-18 23:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 15:02 right compilation unit for C as main? Patrick
2012-12-18 15:28 ` Brian Drummond
2012-12-18 15:42   ` Patrick
2012-12-18 17:13   ` Robert A Duff
2012-12-18 23:04     ` Brian Drummond [this message]
2012-12-19  3:04     ` Simon Wright
2012-12-19  8:00       ` Niklas Holsti
2012-12-19 16:31       ` Robert A Duff
2012-12-18 17:14 ` Robert A Duff
replies disabled

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