?? NEWTITLE := 'LOADER TYPE DEFINITIONS' ??
?? TITLE := '  general_definitions', EJECT ??

  CONST
    loc$master_key_no_lock = 0,
    loc$master_key = 0,
    loc$no_lock = 0;

  CONST
    loc$loader_ring = osc$tsrv_ring;

  CONST
    loc$no_shadow = 0,
    loc$no_shadow_file = NIL;

  TYPE
    lot$address = packed record
      ring: ost$ring,
      segment: ost$segment,
      offset: ost$segment_offset,
    recend,

    lot$module_ring_attributes = record
      loaded_ring,
      call_bracket: ost$valid_ring,
    recend,

    lot$load_file = ^SEQ ( * ),

    lot$load_file_attributes = record
      name: amt$local_file_name,
      library_file: boolean,
      debug_file: boolean,
      key_lock: ost$key_lock,
      execute_privilege: ost$execute_privilege,
      load_file_number: lot$load_file_number,
    recend;

?? TITLE := '  data structure definitions', EJECT ??

  TYPE

    lot$allocated_segments = ^array [ * ] of lot$segment_allocation,

    lot$allocated_segments_index = 1 .. osc$maximum_segment + 1,

    lot$segment_allocation = record
      attributes: lot$segment_attributes,
      segment: ost$segment,
      current_length: ost$segment_length,
      maximum_length: ost$segment_length,
    recend,

    lot$segment_attributes = record
      access_control: ost$segment_access_control,
      r1,
      r2: ost$valid_ring,
      key_lock: ost$key_lock,
      stack: boolean,
      extensible: boolean,
      debug_segment: boolean,
      apd_binding_segment: boolean,
    recend,

    lot$cbp_template = packed record
      unused_bits_1: 0 .. 0f(16),
      vmid: ost$virtual_machine_identifier,
      external_proc_flag: boolean,
      unused_bits_2: 0 .. 7,
      call_bracket: ost$ring,
      address: lot$address,
    recend,

    lot$entry_definition = record
      nnext: ^lot$entry_definition,
      attributes: lot$entry_attributes,
{!  Consider making this record a bound variant record with the following
{fields optional.
{!  How could definitions for task services entry points be established at
{!  task initiation; i.e., which variant would be used?
      defining_module: pmt$program_name,
      xref_list: ^lot$cross_reference,
      xref_listed: boolean,
    recend,

    lot$entry_attributes = record
      gated: boolean,
      global_lock: ost$key_lock_value,
{!  The following field is redundant.
      loaded_ring,
      call_bracket: ost$valid_ring,
      vmid: ost$virtual_machine_identifier,
      address,
      binding_section_address: lot$address,
      declaration_matching_required: boolean,
      declaration_matching: llt$declaration_matching_value,
      source_declaration_matching: boolean,
      language: llt$module_generator,
      in_target_text: boolean,
      block_id: pmt$block_identifier,
      instrumented_callee_address: lot$address,
      instrumented: boolean,
      load_file_number: lot$load_file_number,
    recend,

    lot$cross_reference = record
      nnext: ^lot$cross_reference,
      mmodule: pmt$program_name,
    recend,

    lot$unsatisfied_reference_group = record
      nnext: ^lot$unsatisfied_reference_group,
      logically_satisfied: boolean,
      newly_created: boolean,
      global_key: ost$key_lock_value,
      ring: ost$valid_ring,
      list: ^lot$unsatisfied_reference,
    recend,

    lot$unsatisfied_reference = record
      nnext: ^lot$unsatisfied_reference,
      details: lot$reference_details,
      mmodule: pmt$program_name,
    recend,

    lot$unsatisfied_reference_list = record
      linkage_info: ^lot$linkage_name_lists,
      f_link: ^lot$unsatisfied_reference_list,
      b_link: ^lot$unsatisfied_reference_list,
      library_searched: integer,
      references: ^lot$unsatisfied_reference_group,
    recend,

    lot$linkage_name_lists = record
      name: pmt$program_name,
      definitions_list: ^lot$entry_definition,
      unsat_references_list: ^lot$unsatisfied_reference_list,
    recend,

    lot$reference_details = record
      address: lot$address,
      kind: llt$address_kind,
      offset_operand: ost$segment_offset,
      binding_section_destination: boolean,
      declaration_matching_required: boolean,
      declaration_matching: llt$declaration_matching_value,
      language: llt$module_generator,
      in_target_text: boolean,
    recend,

    lot$param_matching_list = record
      first: ^lot$param_matching_node,
      container: ^HEAP ( * ),
    recend,

    lot$param_matching_node = record
      nnext: ^lot$param_matching_node,
      name: pmt$program_name,
      definitions: ^lot$formal_param_definition,
      references: ^lot$actual_param_group,
    recend,

    lot$formal_param_definition = record
      nnext: ^lot$formal_param_definition,
      global_lock: ost$key_lock_value,
      loaded_ring,
      call_bracket: ost$valid_ring,
      defining_module: pmt$program_name,
      gated: boolean,
      definition: llt$formal_parameters,
    recend,

    lot$actual_param_group = record
      nnext: ^lot$actual_param_group,
      global_key: ost$key_lock_value,
      ring: ost$valid_ring,
      list: ^lot$actual_param_list_item,
    recend,

    lot$actual_param_list_item = record
      nnext: ^lot$actual_param_list_item,
      module_name: pmt$program_name,
      definition: llt$actual_parameters,
    recend,

    lot$common_blocks_index = integer,

    lot$common_block_definition = record
      name: pmt$program_name,
      global_lock: ost$key_lock_value,
      loaded_ring: ost$valid_ring,
      address: lot$address,
      allocation_length: ost$segment_length,
      allocation_alignment,
      allocation_offset: ost$segment_offset,
      access_attributes: llt$section_access_attributes,
      segment_access_control: ost$segment_access_control,
      extensible: boolean,
      unallocated_common: boolean,
      unallocated_common_open: boolean,
      unallocated_common_segment: ost$segment,
      unallocated_common_file_id: amt$file_identifier,
    recend;

?? TITLE := '  parameter_definitions', EJECT ??

  TYPE

    lot$file_descriptor = record
      file_open:boolean,
      file_identifier: amt$file_identifier,
      segment: lot$load_file,
      ring_brackets: amt$ring_attributes,
      attributes: lot$load_file_attributes,
    recend,

    lot$module_descriptor = record
      name: pmt$program_name,
      attributes: lot$module_attributes,
    recend,

    lot$module_attributes = record
      loaded_ring,
      call_bracket: ost$valid_ring,
      global_key_lock: ost$key_lock_value,
      vmid: ost$virtual_machine_identifier,
      binding_section_address: lot$address,
      source_declaration_matching: boolean,
    recend,

    lot$entry_point_descriptor = record
      name: pmt$program_name,
      attributes: lot$entry_attributes,
      defining_module: pmt$program_name,
    recend,

    lot$external_descriptor = record
      name: pmt$program_name,
      global_key: ost$key_lock_value,
      reference_ring: ost$valid_ring,
    recend,

    lot$reference_descriptor = record
{!  The following field is redundant.
      ring: ost$valid_ring,
      global_key: ost$key_lock_value,
      mmodule: pmt$program_name,
      details: lot$reference_details,
    recend,

    lot$section_allocation = record
      kind: llt$section_kind,
      allotted: boolean,
      unallocated_common: boolean,
      address: lot$address,
      length: ost$segment_length,
      local_block_id: pmt$block_identifier,
      segment_predefined: boolean,
      binding_section_offset: llt$section_address_range,
    recend,

    lot$allocated_sections = array [0 .. * ] of lot$section_allocation;

*copyc lot$load_file_number
?? TITLE := '  object_text_definitions', EJECT ??
*copyc llt$object_module

*copyc amt$file_identifier
*copyc amt$local_file_name
*copyc amt$ring_attributes
*copyc mmt$attribute_keyword
*copyc osd$virtual_address
*copyc ost$segment_access_control
*copyc ost$status
*copyc ost$virtual_machine_identifier
*copyc pmt$loadable_rings
*copyc pmt$loader_seq_descriptor
*copyc pmt$program_description
*copyc pmt$program_name
?? OLDTITLE ??
