comp.lang.ada
 help / color / mirror / Atom feed
* interrupt entries and terminate alternatives
@ 1987-11-06 14:15 David Emery
  0 siblings, 0 replies; only message in thread
From: David Emery @ 1987-11-06 14:15 UTC (permalink / raw)



Consider the following:

  procedure P is

    task Tis
      entry INTERRUPT_ENTRY;
    end T;

    task body T is
    begin
      select
        accept INTERRUPT_ENTRY;
      or 
        terminate;
      end select;
    end T;
  begin
    -- do something for a while, and then finish up
    -- what happens to task T when we are finished here?
  end P;

RM 13.5.1 (3) says:
"If a select statement contains both a terminate alternative and an
accept alternative for an interrupt entry, then an implementation may
impose furhter requirements for the selection of the terminatean implementatioaddition to those given in section 9.4."

here are some words from 9.4
"Termination of a task otherwise takes place in and only if its
execution has reached an open terminate alternative in a select
statement and the following conditions are satisfied:
  *  The task depends on some master whose execution is completed
(hence not a library package)
  * Each task that depends on the master considered is either already
terminated or similarly waiting on an open terminate alternative of a
select statement."

Two questions:
  1.  based only on 9.4 (quoted and otherwise), will task T terminate
when the body of P is done?  If this is so, it would make it very hard
to install an "terminate and stay resident" interrupt handler,
wouldn't it? 
  2. In accordance with 13.5.1 (quoted above), does anyone have any
experience/knowledge with specific implementations of interrupt
entries and terminate alternatives?

			dave emery
			emery@mitre-bedford.arpa

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1987-11-06 14:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1987-11-06 14:15 interrupt entries and terminate alternatives David Emery

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