|
|
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: 8192 (0x2000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package V_I_Mbox, seg_04b9b2
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
-- Copyright 1988, 1992 Verdix Corporation
------------------------------------------------------------------------------
-- User interface to the mailbox data structures and subprograms
--
-- Provides backward compatibility with earlier releases of VADS.
--
-- The interface to ALL the low kernel services is now provided in
-- ada_krn_i.a. Types used by these services is defined in ada_krn_defs.a.
--
-- This package simply layers upon the mailbox data structures and
-- subprograms found in ada_krn_defs.a and ada_krn_i.a.
--
-- Differences from earlier releases:
-- [1] The intr_flag and intr_status are only applicable to the
-- VADS_MICRO RTS.
-- [2] For the delete() service, if the conditional_delete_flag is TRUE,
-- the mailbox might not be deleted even though no tasks are
-- waiting to read. This caveat isn't applicable to the VADS_MICRO RTS.
-- [3] For mailbox write, only the DO_NOT_WAIT option is supported.
-- Earlier releases also supported timed and WAIT_FOREVER
--\x09\x09write options.
------------------------------------------------------------------------------
with System;
with Ada_Krn_Defs;
with Ada_Krn_I;
package V_I_Mbox is
pragma Suppress (All_Checks);
pragma Suppress (Exception_Tables);
pragma Not_Elaborated;
type Intr_Status_T is new Ada_Krn_Defs.Intr_Status_T;
-- DISABLE_INTR_STATUS\x09: constant intr_status_t :=
--\x09\x09intr_status_t(ada_krn_defs.DISABLE_INTR_STATUS);
function Disable_Intr_Status return Intr_Status_T;
pragma Inline_Only (Disable_Intr_Status);
-- Predefined wait_time values
Wait_Forever : constant Duration := -1.0;
Do_Not_Wait : constant Duration := 0.0;
--------------------------------------------------------------------------
-- "read_write" function parameter types
--------------------------------------------------------------------------
type Access_T is (Read_A, Write_A);
for Access_T use (Read_A => 1, Write_A => 2);
for Access_T'Size use Integer'Size;
--------------------------------------------------------------------------
-- The following types are used to define the mailbox data structure
--------------------------------------------------------------------------
type Mbox_Record_T is new Ada_Krn_Defs.Mailbox_T;
type A_Mbox_T is new Ada_Krn_Defs.A_Mailbox_T;
--------------------------------------------------------------------------
-- Create a new mailbox. A mailbox consists of n fixed length slots.
-- The slot_len parameter specifies the length in units of
-- system.storage_unit (normally bytes).
--
-- Normally, a mailbox's critical region is protected by a
-- semaphore.
--
-- However, if the intr_flag is TRUE, then,
-- its critical region is protected by disabling interrupts. This
-- allows the mailbox to be accessed from an ISR.
--
-- STORAGE_ERROR exception is raised if not enough memory for mailbox.
--
-- Use of the intr_flag and intr_status fields is only applicable
-- to the VADS_MICRO.
--------------------------------------------------------------------------
function Create (Slots_Cnt : Positive;
Slot_Len : Natural;
Intr_Flag : Boolean := False;
Intr_Status : Intr_Status_T := Disable_Intr_Status)
return A_Mbox_T;
pragma Inline_Only (Create);
--------------------------------------------------------------------------
-- Deletes a previously created mailbox. Returns TRUE if mailbox
-- was successfully deleted.
--
-- If conditional_delete_flag parameter is TRUE, then, mailbox
-- is not deleted if any of the following are TRUE:
-- - task is waiting to read/write
-- - unread messages
-- Otherwise, mailbox is always deleted, and tasks waiting to read/write
-- are resumed.
--
-- Note: if the conditional_delete_flag is TRUE, the mailbox might not
-- be deleted even though no tasks are waiting to read. This caveat isn't
-- applicable to the VADS_MICRO.
--------------------------------------------------------------------------
function Delete (Mbox : A_Mbox_T; Conditional_Delete_Flag : Boolean)
return Boolean;
pragma Inline_Only (Delete);
--------------------------------------------------------------------------
-- Reads/writes a message from/to a mailbox. The access_type parameter
-- indicates the type of access. Returns TRUE if message was
-- successfully read/written.
--
-- If no message is available for reading, or if no slot is available
-- for writing, then, returns according to the wait_time parameter:
-- < 0.0 - returns when message was successfully read/written.
-- This may necessitate suspension of current task
-- until another task does mailbox write/read.
-- = 0.0 - returns FALSE immediately if unable to do
-- mailbox operation
-- > 0.0 - if the mailbox operation cannot be completed
-- within "wait_time" amount of time, returns FALSE.
--
-- Note: returns FALSE for any wait_time, if mailbox was deleted.
--
-- For mailbox write, only the DO_NOT_WAIT option is supported.
-- In earlier releases, also supported timed and WAIT_FOREVER
-- write options.
--------------------------------------------------------------------------
function Read_Write (Access_Type : Access_T;
Mbox : A_Mbox_T;
Msg_Addr : System.Address;
Msg_Len : Natural;
Wait_Time : Duration) return Boolean;
pragma Inline_Only (Read_Write);
--------------------------------------------------------------------------
-- Returns number of unread messages in mailbox
--------------------------------------------------------------------------
function Get_Message_Count (Mbox : A_Mbox_T) return Natural;
pragma Inline_Only (Get_Message_Count);
end V_I_Mbox;
nblk1=7
nid=0
hdr6=e
[0x00] rec0=16 rec1=00 rec2=01 rec3=03c
[0x01] rec0=1a rec1=00 rec2=02 rec3=036
[0x02] rec0=16 rec1=00 rec2=03 rec3=04a
[0x03] rec0=15 rec1=00 rec2=04 rec3=026
[0x04] rec0=13 rec1=00 rec2=05 rec3=008
[0x05] rec0=13 rec1=00 rec2=06 rec3=05e
[0x06] rec0=07 rec1=00 rec2=07 rec3=001
tail 0x21750bd908684384aae85 0x42a00088462060003