|
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 - download
Length: 8192 (0x2000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package V_I_Callout, seg_03bd9e
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
-- Copyright 1989, 1991 Verdix Corporation ------------------------------------------------------------------------------ -- User interface to the program / task callout services ------------------------------------------------------------------------------ with V_I_Types; use V_I_Types; with System; use System; package V_I_Callout is pragma Suppress (All_Checks); pragma Suppress (Exception_Tables); pragma Not_Elaborated; -- Callout events type Callout_Event_T is (Exit_Event, Unexpected_Exit_Event, Program_Switch_Event, -- stack limit checking must be suppressed Task_Create_Event, Task_Switch_Event, Task_Complete_Event); for Callout_Event_T'Size use Integer'Size; -- Id for accessing user defined storage in the task control block type Task_Storage_Id is new Integer; No_Task_Storage_Id : constant Task_Storage_Id := Task_Storage_Id (0); -- Service to install a program or task callout. procedure Install_Callout (Event : Callout_Event_T; Proc : Address); -- If not enough memory in the kernel for the callout control -- block, then, the STORAGE_ERROR exception is raised. -- --\x09Callout procedures are called in the order they are installed. -- The callouts reside in the user program's -- space. The EXIT_EVENT and UNEXPECTED_EXIT_EVENT callouts are -- called in the context of the main program's task. The remaining -- callouts are called directly from kernel logic (use the kernel's -- stack) and can only call kernel services that are re-entrant, the -- same services callable from ISR's. The service of most interest is -- TS_CURRENT_TIME which would be called for time stamping. -- -- Before any non-PROGRAM_SWITCH_EVENT callout procedure is -- invoked, the STACK_LIMIT in the user program is set to 0 to -- negate any stack limit checking. Therefore, the callout -- procedures don't need to be compiled with stack limit checking -- suppressed. However, the STACK_LIMIT isn't zeroed before calling -- the PROGRAM_SWITCH_EVENT callout. It needs to be compiled with -- stack checking suppressed. -- -- Except for the PROGRAM_SWITCH_EVENT, the callouts are only -- installed and called for the program where they reside. -- -- An overview of each callout follows: -- -- EXIT_EVENT --\x09\x09Called when the program exits or terminates itself. Not --\x09\x09called when the program is terminated from another program. --\x09\x09Still called when the UNEXPECTED_EXIT_EVENT callout is called. -- -- UNEXPECTED_EXIT_EVENT --\x09\x09Called when the program is abandoned due to an unhandled Ada --\x09\x09exception. --\x09\x09 --\x09 PROGRAM_SWITCH_EVENT --\x09\x09Called before switching to a task that resides in a --\x09\x09program different from the current program. Called for --\x09\x09all program switches, not just switches to and from the --\x09\x09program containing the callout. -- --\x09 TASK_CREATE_EVENT --\x09\x09Called whenever a task is created in the program containing -- the callout. Since the TASK_CREATE_EVENT callout can be --\x09\x09called after numerous tasks have already been created, the --\x09\x09install_callout service loops through all existing tasks --\x09\x09invoking the just installed TASK_CREATE_EVENT callout before --\x09\x09returning. -- --\x09 TASK_SWITCH_EVENT --\x09\x09Called before switching to a different task in the same --\x09\x09program. For a program switch, the TASK_SWITCH_EVENT -- callout is called with the tsk parameter set to --\x09\x09v_i_types.null_task. -- --\x09 TASK_SWITCH_COMPLETE --\x09\x09Called whenever any task in the callout's program completes or --\x09\x09is aborted. -- -- -- An EXIT_EVENT or UNEXPECTED_EXIT_EVENT callout procedure -- is called as follows: --\x09 procedure exit_callout_proc( --\x09\x09\x09status:\x09\x09\x09integer);\x09-- main subprogram --\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09-- return status -- -- A PROGRAM_SWITCH_EVENT callout procedure is called as follows: --\x09 procedure program_switch_callout_proc( --\x09 new_prg: \x09a_progam_t; --\x09\x09\x09new_key:\x09\x09address); -- -- A TASK_CREATE_EVENT, TASK_SWITCH_EVENT or TASK_COMPLETE_EVENT -- callout procedure is called as follows: --\x09 procedure task_callout_proc( --\x09 tsk: \x09\x09a_task_t); -- Service to allocate storage in the task control block function Allocate_Task_Storage (Size : Integer) return Task_Storage_Id; -- If not enough memory in the task control block for the -- task storage, then, the STORAGE_ERROR exception is raised. -- The configuration parameter, TASK_STORAGE_SIZE, defines -- the size of the storage area set aside in the -- control block for each task. -- Each allocation from this area is aligned on a 4 or 8 -- byte boundary (the alignment is CPU dependent). -- The task storage allocation is only applicable to tasks in the -- current program. -- This service returns the starting address of the task storage area function Get_Task_Storage (Tsk : A_Task_T; Storage_Id : Task_Storage_Id) return Address; -- The storage_id parameter, contains the value returned by -- a previous call to allocate_task_storage. Its only -- applicable to tasks in the program where the -- allocate_task_storage service was called from. private pragma Interface (Ada, Install_Callout); pragma Interface_Name (Install_Callout, "__INSTALL_CALLOUT"); pragma Interface (Ada, Allocate_Task_Storage); pragma Interface_Name (Allocate_Task_Storage, "TS_ALLOCATE_TASK_STORAGE"); pragma Interface (Ada, Get_Task_Storage); pragma Interface_Name (Get_Task_Storage, "__GET_TASK_STORAGE"); end V_I_Callout;
nblk1=7 nid=0 hdr6=e [0x00] rec0=1c rec1=00 rec2=01 rec3=066 [0x01] rec0=12 rec1=00 rec2=02 rec3=024 [0x02] rec0=16 rec1=00 rec2=03 rec3=03e [0x03] rec0=18 rec1=00 rec2=04 rec3=02a [0x04] rec0=17 rec1=00 rec2=05 rec3=054 [0x05] rec0=19 rec1=00 rec2=06 rec3=014 [0x06] rec0=02 rec1=00 rec2=07 rec3=000 tail 0x215347eca8565742627a4 0x42a00088462060003