comp.lang.ada
 help / color / mirror / Atom feed
From: emery%aries@MITRE-BEDFORD.ARPA (David Emery)
Subject: interrupt entries and terminate alternatives
Date: Fri, 6-Nov-87 09:15:13 EST	[thread overview]
Date: Fri Nov  6 09:15:13 1987
Message-ID: <8711061415.AA06432@aries> (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

                 reply	other threads:[~1987-11-06 14:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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