comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Dynamic allocation of tasks
Date: 2000/03/27
Date: 2000-03-27T00:00:00+00:00	[thread overview]
Message-ID: <wcc1z4wnjrw.fsf@world.std.com> (raw)
In-Reply-To: 874s9yd6s2.fsf@deneb.cygnus.argh.org

Florian Weimer <fw@deneb.cygnus.argh.org> writes:

> In my last posting, I have failed to mention a piece of information which
> might be important: after an "abort Some_Task;", "Some_Task'Terminated'
> never became true (even if I waited three or five seconds before
> examining the attribute).  In fact, this motivated my first RM
> interpretation that an abnormal task is not a terminated task.

That's correct -- abnormal is not the same thing as terminated.  An
"abort T;" says, more or less, "Dear T, please start aborting yourself
when you get around to it."  When the abort statement is over, the
aborting task doesn't know much of anything about the status of T.

I didn't see your exact program, so I don't know what's going on.
Perhaps you have a higher priority task running, which prevents the
abortee from running, so it never gets around to terminating itself?
Maybe the higher priority task was the one doing the abort?

In Ada, especially Ada 95, the way the run-time system normally does
aborts is that the abortee does the work.  The aborter sends some sort
of message to the abortee, and the abortee then does something that's a
lot like raising an exception.  This causes local variables to be
finalized, and eventually terminates the task.  But the task has to run
for that to happen, which means that it has to be the highest priority
task at some point (assuming a single CPU).

Another point is that if the abortee doesn't do certain things (such as
entry calls), then it might *never* notice that it is abnormal.  Unless
the implementation supports the real-time annex, where the rules are
more stringent.

>...  (No,
> compiler behavior does not determine my RM interpretations, but it
> suggest the direction in which I search for evidence.

;-)

- Bob




  reply	other threads:[~2000-03-27  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-22  0:00 Dynamic allocation of tasks Florian Weimer
2000-03-22  0:00 ` Robert Dewar
2000-03-22  0:00   ` Florian Weimer
2000-03-22  0:00     ` Lutz Donnerhacke
2000-03-22  0:00       ` Florian Weimer
2000-03-27  0:00         ` Robert A Duff [this message]
2000-03-28  0:00           ` Florian Weimer
2000-03-28  0:00             ` Tucker Taft
2000-03-23  0:00     ` Robert Dewar
2000-03-24  0:00       ` Florian Weimer
replies disabled

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