|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 6261 (0x1875)
Types: TextFile
Notes: R1k Text-file segment
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦37ad64c9e⟧
└─⟦this⟧
-- "This unpublished work is protected both as a proprietary work and
-- under the Universal Copyright Convention and the US Copyright Act of
-- 1976. Its distribution and access are limited only to authorized
-- persons. Copr. (c) Alsys. Created 1990, initially licensed 1990.
-- All rights reserved.
-- Unauthorized use (including use to prepare other works), disclosure,
-- reproduction, or distribution may violate national criminal law."
------------------------------------------------------------------------------
-- This module is a generic template for the EVENT_MANAGEMENT package --
-- required by CIFO 3.0, which is obtained by instantiating this generic. --
------------------------------------------------------------------------------
-- *********************
-- * TABLE OF CONTENTS *
-- *********************
-- 1. Generic Parameters
-- 2. User Visible Types
-- 3. Event Testing
-- 4. Signal Operations
-- 5. Event Construction
-- 6. Wait Operations
-- 7. IBM SOW Declarations
-- 13. Instantiations
generic
-- *************************
-- * 1. GENERIC PARAMETERS *
-- *************************
MAX_EVENTS : INTEGER;
-- This parameter controls the maximum number of events which can be
-- handled as part of a single COMPLEX_EVENT value, avoiding additional
-- heap allocations. The size of a COMPLEX_EVENT depends on this value
-- since enough space is allocated to hold an expression of this size.
SIGNAL_MAX_EXCEEDED : BOOLEAN := FALSE;
-- This parameter controls the behaviour of the system if a complex
-- expression exceeds the threshhold specified by the MAX_EVENTS value.
-- If the value of the parameter is FALSE, then storage for at least
-- part of the complex event structure may be obtained from the heap.
-- This avoids any limits on the complexity of event expressions, but
-- can result in storage leaks. If the parameter is TRUE, then an attempt
-- to build a complex expression exceeding the limit causes the exception
-- MAX_EVENTS_EXCEEDED to be raised, warning the programmer that the
-- attempted event construction may lead to storage leaks.
package CIFO_EVENT_MANAGEMENT is
-- The library contains a standard instantiations of this package:
-- package EVENT_MANAGEMENT
-- is new CIFO_EVENT_MANAGEMENT (MAX_EVENTS => 6,
-- SIGNAL_MAX_EXCEEDED => FALSE);
-- This generates a package which has no limit on the complexity of
-- complex events, but which uses the heap if the number of events
-- exceeds 6, and may thus cause storage leaks in these cases.
-- *************************
-- * 2. USER VISIBLE TYPES *
-- *************************
type EVENT is limited private;
-- Note: we have deliberately changed this to limited private, since the
-- semantics of both assignment and comparison of EVENTs is obscure.
type COMPLEX_EVENT is private;
-- ********************
-- * 3. EVENT TESTING *
-- ********************
function IS_SET (AN_EVENT : in EVENT) return BOOLEAN;
function IS_SET (EXPRESSION : in COMPLEX_EVENT) return BOOLEAN;
pragma INLINE (IS_SET);
-- ************************
-- * 4. SIGNAL OPERATIONS *
-- ************************
procedure SET (TARGET_EVENT : in out EVENT);
procedure RESET (TARGET_EVENT : in out EVENT);
procedure TOGGLE (TARGET_EVENT : in out EVENT);
procedure PULSE (TARGET_EVENT : in out EVENT);
-- *************************
-- * 5. EVENT CONSTRUCTION *
-- *************************
function COMPLEX_EVENT_OF (SIMPLE_EVENT : EVENT) return COMPLEX_EVENT;
function "and" (LEFT, RIGHT : EVENT) return COMPLEX_EVENT;
function "and" (LEFT : COMPLEX_EVENT; RIGHT : EVENT) return COMPLEX_EVENT;
function "and" (LEFT : EVENT; RIGHT : COMPLEX_EVENT) return COMPLEX_EVENT;
function "and" (LEFT, RIGHT : COMPLEX_EVENT) return COMPLEX_EVENT;
function "or" (LEFT, RIGHT : EVENT) return COMPLEX_EVENT;
function "or" (LEFT : COMPLEX_EVENT; RIGHT : EVENT) return COMPLEX_EVENT;
function "or" (LEFT : EVENT; RIGHT : COMPLEX_EVENT) return COMPLEX_EVENT;
function "or" (LEFT, RIGHT : COMPLEX_EVENT) return COMPLEX_EVENT;
function "xor" (LEFT, RIGHT : EVENT) return COMPLEX_EVENT;
function "xor" (LEFT : COMPLEX_EVENT; RIGHT : EVENT) return COMPLEX_EVENT;
function "xor" (LEFT : EVENT; RIGHT : COMPLEX_EVENT) return COMPLEX_EVENT;
function "xor" (LEFT, RIGHT : COMPLEX_EVENT) return COMPLEX_EVENT;
function "not" (AN_EVENT : EVENT) return COMPLEX_EVENT;
function "not" (AN_EVENT : COMPLEX_EVENT) return COMPLEX_EVENT;
MAX_EVENTS_EXCEEDED : exception;
-- **********************
-- * 6. WAIT OPERATIONS *
-- **********************
procedure WAIT_ON (AN_EVENT : in COMPLEX_EVENT);
procedure CANCEL_WAIT_ON (TSK : in TASK_ID);
-- This procedure is used by the SCHEDULER. It removes a task from the
-- event structures (if it is currently chained). It is used for functions
-- such as task abort.
-- ***************************
-- * 7. IBM SOW DECLARATIONS *
-- ***************************
-- This section contains renamings and additional declarations required
-- by the IBM statement of work for the Lynx project. This SOW introduces
-- slightly different names, apparently taken from some intermediate
-- version of CIFO, between the 2.0 and 3.0 documents.
subtype EVENT_EXPRESSION is COMPLEX_EVENT;
function VALUE_OF (AN_EVENT : in COMPLEX_EVENT) return BOOLEAN
renames IS_SET;
function EXPRESSION_OF (SIMPLE_EVENT : EVENT) return COMPLEX_EVENT
renames COMPLEX_EVENT_OF;
procedure INITIALIZE (TARGET_EVENT : in out EVENT;
VALUE : in BOOLEAN := FALSE);
pragma INLINE (INITIALIZE);
end CIFO_EVENT_MANAGEMENT;
-- **********************
-- * 13. INSTANTIATIONS *
-- **********************
with CIFO_EVENT_MANAGEMENT;
package EVENT_MANAGEMENT is
new CIFO_EVENT_MANAGEMENT (MAX_EVENTS => 6,
SIGNAL_MAX_EXCEEDED => FALSE)