|
|
DataMuseum.dkPresents historical artifacts from the history of: Bogika Butler |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Bogika Butler Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 16896 (0x4200)
Types: TextFile
Names: »COMDEF.BAK«
└─⟦08e5746f0⟧ Bits:30009789/_.ft.Ibm2.50007359.imd Mogens Pelles Zilog 80,000 / EOS projekt
└─⟦this⟧ »COMDEF.BAK«
(*
***********************************************************************
* Copyright 1984 by *
* NCR Corporation *
* Dayton, Ohio U.S.A. *
* All Rights Reserved *
***********************************************************************
* EOS Software produced by: *
* NCR Systems Engineering - Copenhagen *
* Copenhagen *
* DENMARK *
***********************************************************************
* EOS Software rewritten by: *
* Lars G. Jakobsen *
* Metanic Aps. *
* DK-3660 Stenloese *
* DENMARK *
* *
* Copyright 1986 by Metanic Aps. *
***********************************************************************
*)
(*
This file defines constants, data types and primitive operations
on abstract datatypes.
Names of constants and fields of structures complies with the
names used by NCR secp in the Motorola EXORmacs 680000 implementation
of the kernel.
*)
TYPE
long = integer;
word = 0..65535;
byte = 0..255;
AddressType = integer; (* Used to represent assembler chaining
fields instead of ordinary pascal
pointers *)
PhysicalAddressType = integer;
(*---------------------------------------------------------------------
CHAIN AND MEMBER *)
TYPE
ChainPointerType = ^ChainType;
ChainType = RECORD
Next: ChainPointerType; (* next element, always meaningful *)
Prev: ChainPointerType; (* previous element, always meaningful *)
END;
MemberType = RECORD
Chain: ChainType;
Ch_hold: AddressType; (* Addr of structure holding chain head *)
END;
CONST
Ch_siz = 4; (* Number of word in chain *)
Member = 6; (* Number of word in member element *)
(*---------------------------------------------------------------------
SIZE TYPE *)
TYPE
SizeType = RECORD
UserPart: long; (* no. of bytes in user part *)
KnelPart: word; (* no. of bytes in kernel part *)
END;
CONST
Sz_siz = 6; (* size of size type *)
Sz_typ = 3; (* number of words in size type *)
(*--------------------------------------------------------------------
POINTER AND FORMAL POINTER *)
TYPE
PointerKindType =
(pt_nil (* nil often set with clear instruction *)
,pt_obj (* refObj *)
,pt_env (* refEnv ( <= pt_env means simple ref) *)
,pt_own (* ownSet *)
,pt_man (* manSet *)
,pt_int (* interrupt pointer, always local (refers to a code segment)*)
,pt_mmu (* mmuDescription ref to object (not a real pointer) *)
,pt_seg (* segmentDescription ref to object (not a real pointer) *)
);
(* VOID argument encoded as 6 = pt_mmu. Used for argument check *)
pt_voi = (.pt_int..pt_seg.); (* *** ??? *** *)
PointerInfoKindType = (interrupt_pointer, non_interrupt_pointer);
PointerInfoBaseType =
(* Comments describe the meaning of the elements belonging to the set *)
(.pt_lsc (* 0 local scope pointer *)
,pt_tsc (* 1 temp scope pointer *)
,pt_fsc (* 2 formal scope pointer *)
,pt_cc (* 3 simple pointer with call capability (0 if nil) *)
,pt_con (* 4 manager enforces copy control (0 if nil) *)
,pt_io (* 5 simple pointer with io-lock (0 if nil) *)
,pt_res (* 6 simple pointer with resident lock (0 if nil ) *)
,pt_ret (* 7 formal return pointer (also=1 for dummy actual) *)
.)
PointerInfoSetType = SET of PointerInfoBaseType;
PointerInfoType = RECORD
(* The Pascal interpretation of PointerInfoType is based on
the declarations in kernel.comdef.sa page 2 and the usage
shown at entry simplpt of kernel.mmprocs.sa page 41. *)
CASE PointerInfoKindType OF
interrupt_pointer: (* For interrupt pointers all bits of pt_inf
represent the interrupt vector number *)
(pt_inf: byte
);
non_interrupt_pointer:
(pt_inf: PointerInfoSetType
)
END;
PointerCommonPartType = RECORD
Pointer: memberType;
(* ownset and manset: pointer -> obj or env
refobj and refenv: obj or env -> pointer
nil: empty chain.
ch_hold (named pt_ref):
ownset, manset, nil: not used.
refobj and refenv: addr of obj or env.
*)
pt_kin: PointerKindType;
(* pointer kind. See above *)
pt_inf: PointerInfoType;
(* pointer inf. See above. pt_kin+pt_inf=word *)
END;
PointerFormalPartType = RECORD
(* part only present for formal pointers *)
fp_act: memberType; (* actual: env or ctx -> formal pointer
ch_hold (named fp_str):
addr of env or ctx structure, 0 if dummy
*)
fp_off: word; (* actual pointer offset within env or ctx *)
END;
PointerType = RECORD
Common: PointerCommonPartType
END;
FormalPointerType = RECORD
Common: PointerCommonPartType;
Formal: PointerFormalPartType
END;
CONST
pt_siz = sizeof(PointerCommonPartType);
(* size of non-formal pointer *)
fp_siz = sizeof(FormalPointerType);
(* size of formal pointer *)
(* fp_siz must be less than or equal to fp_pow2 = 32 *)
fp_pow2 = 32;
pt_mask = (2**15)/fp_pow2 - 1;
(* mask for pointer index <= 2**15/fp_siz *)
(*--------------------------------------------------------------------
OBJECT COMMON PART *)
TYPE
ObjectKindType =
(OB_GEOB (* 0 General object *)
,OB_GAOB (* 1 Gate object *)
,OB_COOB (* 2 Condition object *)
,OB_OPOB (* 3 Open object *)
,OB_DOOB (* 4 Dormant object *)
,OB_PROB (* 5 Process object *)
,OB_EXOB (* 6 Extension object (Kind not visible to user) *)
,OB_SEOB (* 7 Segment object (emb or non-emb, subsegm or root segm) *)
,OB_ALLO (* 8 Allocate *)
,OB_SCHE (* 9 Internal scheduler *)
);
ObjectStateBaseType =
(OB_REEN (* 0 Reentrant object (only general objects) *)
,OB_EMB (* 1 Embedded object (only general objects) *)
,OB_SUB (* 2 Subsegment object *)
,OB_OCC (* 3 Owner has call capability (only general objects) *)
,OB_READ (* 4 Read allowed (only segment objects) *)
,OB_WRIT (* 5 Write allowed (only segment objects) *)
,OB_EXEC (* 6 Execute allowed (only segment objects) *)
,OB_ABOR (* 7 Aborted object (General and segment objects) *)
);
ObjectStateType = SET OF ObjectStateBaseType;
CONST
OB_SEGM: ObjectStateType = (. OB_READ, OB_WRIT, OB_EXEC .);
OB_SUBS: ObjectStateType = (. OB_SUB, OB_SEGM .);
TYPE
ObjectCommonPartType = RECORD
Owner: MemberType;
(* Ownset -> Object
OB_Own = Ch_hold: addr. of owner env or ctx *)
OB_Off: word;
(* Owner pointer offset in env or ctx
(0 for initial owner pointer) *)
OB_Ref: ChainType;
(* Referred by: Object -> RefObj, SebSegm, MMUdescr *)
OB_Res: word;
(* Resident Count: Non segment object = #res_pt
to object *)
OB_SizK: word;
(* Size of kernel part (used also for emb obj) *)
OB_Kin: ObjectKindType;
(* See above *)
OB_Sta: ObjectStateType;
(* See above *)
OB_Spa: AddressType;
(* *** ??? *** *)
(* Space descr: Top Object, abs. ddr.
Disagrees with size of object during
relocation (not used for embedded objects) *)
END;
CONST
OB_Siz = sizeof(ObjectCommonPartType);
(*--------------------------------------------------------------------
SPACE DESCRIPTION, PRESENT ONLY FOR NON-EMBEDDED OBJECTS
ADDRESSES RELATIVE TO TOP OF KERNEL PART See kernel.comdef.sa p 3. *)
TYPE
SpaceDescriptionType = RECORD
Sp_env: ChainType; (* Envelope stack: Object -> env *)
Sp_fre: SizeType; (* Free bytes. User and kernel part *)
Sp_FirU: long; (* First free. User part *)
Sp_Firk: long; (* First free. Kernel part *)
Sp_SizU: long; (* Total size. User part *)
END;
(*--------------------------------------------------------------------
GATE OBJECT *)
TYPE
GateChainArrayIndexType =
(GA_lok (* Locking: Gate -> processes waiting on gate.lock *)
,GA_relok (* Relocking: Gate -> Processes relocking after being
signalled *)
,GA_splok (* Speed reloking: Gate -> Processes relocking after
speed up or time out *)
);
GateStateType =
(open
,locked
);
GateLevelType =
(Normal
,device1
,device2
,device3
,device4
,device5
,device6
,device7
);
ObjectGatePartType = RECORD
GA_sch: PointerCommonPartType;
(* ObjRef to Scheduler obj or nil *)
GA_set: ChainType;
(* ManSet: Gate -> Cond *)
GA_array: ARRAY (. GateChainArrayIndexType .) OF ChainType;
GA_sta: GateStateType; (* open = 0, locked = 2**7=128 *)
(* *** ??? *** could it be boolean ??? *)
GA_lev: GateLevelType
END;
GateObjectType = RECORD
ObjectCommonPart: ObjectCommonPartType;
ObjectGatePart: ObjectGatePartType
END;
CONST
GA_siz = sizeof(GateObjectType);
(*--------------------------------------------------------------------
CONDITION OBJECT *)
TYPE
ObjectConditionPartType = RECORD
CO_man: MemberType; (* Manager: manset in gate -> condition
CO_GA = ch_hold: addr. of managing
gate object. 0 when cond is aborted *)
CO_wait: ChainType; (* Waiting: condition -> processes
waiting on cond.wait *)
END;
ConditionObjectType = RECORD
CommonPart: ObjectCommonPartType;
ConditionPart: ObjectConditionPartType
END;
CONST
CO_Siz = sizeof(ConditionObjectType);
(*--------------------------------------------------------------------
EXTENSION AND PROCESS OBJECT *)
TYPE
ObjectExtensionPartType = RECORD
EX_ctx: ChainType; (* Contexts: Extension obj-> ctx *)
EX_ext: MemberType; (* Extension: Process obj -> ext
EX_pr = CH_hold = address of process obj *)
END;
RegisterType = long;
RegisterSaveAreaType = ARRAY (. RegisterSaveAreaIndexType .) OF
RegisterType;
TimeType = RECORD
MSL: long;
LSL: long
END;
ProcessPriorityType = ();
(* *** ??? *** *)
ProcessStateType = (run (* 0 *)
,wait (* 2 *)
,d_wait (* 4 *)
,lock (* 6 *)
,signld (* 8 *)
);
SynchronizationResultType = ();
(* *** ??? *** *)
ObjectProcessPartType = RECORD
PR_main: ChainType; (* Main queue: Gate locking, gate relocking,
gate speed lock, timer or
driving -> process *)
PR_aux: MemberType; (* Aux queue: Condition, running, se_wait,
pr_term, mm_queue -> process
PR_con = CH_hold = address of
condition object or undef *)
PR_term: ChainType; (* Proc. waiting for terminate: proc->proc *)
PR_d0.a3: RegisterSaveAreaType;
(* Register save area: Used between time slices.
Alloc saves part of stack, not gers. *)
PR_timo: TimeType; (* Time out: 64 bit point in time for
reschedule *)
PR_cpu: TimeType; (* Cpu time: No of usec used by the process
(64bits) *)
PR_pri: ProcessPriorityType;
(* Priority: Used for interrupt level and
lock control *)
PR_sta: ProcessStateType;
(* Used when a "process" is speeded up *)
PR_syn: SynchonizationResultType;
(* Result of a sync_func. (e.g. wait) *)
END;
ExtensionObjectType = RECORD
CommonPart: ObjectCommonPartType;
ExtensionPart: ObjectExtensionPartType
END;
ProcessObjectType = RECORD
CommonPart: ObjectCommonPartType;
ExtensionPart: ObjectExtensionPartType;
ProcessPart: ObjectProcessPartType
END;
CONST
EX_siz = sizeof(ExtensionObjectType);
PR_siz = sizeof(ProcessObjectType);
(*--------------------------------------------------------------------
SEGMENT AND SUBSEGMENT OBJECT *)
TYPE
ObjectSegmentPartType = RECORD
SE_io: word; (* IO_count: #io_refs to segment and to
sub segments *)
SE_fir: PhysicalAddressType;
(* First physical address of user segment
(even). Undefined when segment is aborted *)
SE_len: long; (* Length of user segment (even). Undefined
when segment is aborted *)
SE_wait: ChainType; (* IO_count_wait: segm -> proc waiting for
io_count to become 0 *)
END;
ObjectSubSegmentPartType = RECORD
SU_p: PointerType; (* Points to base segment or subsegment.
SU_ref = PT_ref = address of base segment
or sub segment (0 if
base segment removed)
SU_kin = PT_kin = Kind (=subsegment(=PT_seg))
SU_inf = PT_inf Not used. *)
END;
SegmentObjectType = RECORD
CommonPart: ObjectCommonPartType;
SegmentPart: ObjectSegmentPartType
END;
SubSegmentObjectType = RECORD
CommonPart: ObjectCommonPartType;
SegmentPart: ObjectSegmentPartType;
SubSegmentPart: ObjectSubSegmentPartType
END;
NonEmbeddedSegmentObjectType = RECORD
SpacePart: SpaceDescriptorType;
CommonPart: ObjectCommonPartType;
SegmentPart: ObjectSegmentPartType
END;
CONST
SE_siz = sizeof(SegmentObjectType);
SU_siz = sizeof(SubSegmentObjectType);
NEmb_Siz = sizeof(NonEmbeddedSegmentObjectType);
«eof»