
{ Internal constants and type declarations for the NOS/VE memory link
{interface. }
?? PUSH (LISTEXT := ON) ??
*copyc MLD$MEMORY_LINK_DECLARATIONS
*copyc ost$signature_lock
*copyc jmt$system_supplied_name
?? POP ??
*copyc tmc$signal_identifiers

  CONST
    mlc$message_queue_size = 30,
    mlc$keypoint_class = 15, {**** subject to change ****}
    mlc$ilk = 1,
    mlc$not_ilk = 0,
    mlc$shift = 256,
    mlc$empty_entry = - 1,
    mlc$signal_handler_ring = 3,
    mlc$not_found = 0,
    mlc$end_of_chain = 0,
    mlc$max_sn_entry = 128,
    mlc$max_primary_entry = 128,
    mlc$max_signons_per_job = 25,
    mlc$max_ant_entries = 2048;

  TYPE
    mlt$ant_entry = record
{  note that order of fields is vital for alignment of cs_lock words }
      reservation: ALIGNED [0 MOD 8] ost$cs_lock,
      application_name: mlt$application_name,
      forward_p: mlt$ant_index,
      backward_p: mlt$ant_index,
      sn_fwd_p: mlt$ant_index,
      sn_bkwd_p: mlt$ant_index,
      max_messages: mlt$max_messages,
      receive_list: ^mlt$int_receive_list,
      permit_list: ^mlt$permit_list,
      system_name: mlt$system_name,
      highest_rl_entry,
      active_rl_count,
      unique: integer,
      handler: mlt$handler,
      last_operation: mlt$operation,
      multiple: boolean,
      job_recovery_index: 0 .. mlc$max_signons_per_job,
    recend,
    mlt$keypoint_id = (mlc$kp_signon, mlc$kp_signoff, mlc$kp_addspl,
      mlc$kp_delspl, mlc$kp_fetchrl, mlc$kp_confirm, mlc$kp_send,
      mlc$kp_receive, mlc$kp_mlierr, mlc$kp_status, mlc$kp_register_sh,
      mlc$kp_handle_signal, mlc$kp_invoke_handler, mlc$kp_send_signal),
    mlt$internal_error = (unlock_err, signon_res_conflict, case_err,
      send_rl_conflict, need_c170_name, bad_system_name, unique_error,
      register_handler),
{
{ A system_name is defined as follows:
{   C170 = C170 flag and C170 jsn.
{   C180 = C180 flag and C180 task id.
{
    mlt$system_name = record
      case c170_c180_flag: mlt$c170_c180_flag of
      = c170 =
        name_170: integer,
      = mlc$c180 =
        name_180: ost$global_task_id,
      casend,
    recend,
    mlt$permit_index = 0 .. mlc$max_permits,
    mlt$search_status = (found, not_found, no_match),
    mlt$c170_c180_flag = (c170,mlc$c180, mlc$none),
    mlt$ant_index = 0 .. mlc$max_ant_entries,
    mlt$sn_table_index = 0..mlc$max_sn_entry,
    mlt$int_receive_list_entry = record
      sender_name: mlt$application_name,
      arbitrary_info: mlt$arbitrary_info,
      message_location: ^array [ * ] of cell,
      message_length: mlt$message_length,
      chained_entry: ^mlt$int_receive_list_entry,
      ssn: jmt$system_supplied_name,
    recend,
    mlt$unique = set of 1 .. mlc$max_signons_per_system_name,
    mlt$pmt_signal = record
      data: packed array [1 .. 7] of 0 .. 0ff(16),
      from: mlt$application_name,
      dest: mlt$application_name,
      direction: mlt$direction,
      pad: array [1 .. 8] of 0 .. 0ff(16),
    recend,
    mlt$permit_list_entry = record
      sender: mlt$application_name,
    recend,
    mlt$int_receive_list = array [1 .. mlc$max_queued_messages] of
      mlt$int_receive_list_entry,
    mlt$permit_list = array [1 .. mlc$max_permits] of mlt$permit_list_entry,
    mlt$shared_segment = record
{  note that order of fields is vital for alignment of cs_lock words }
      tlock: ALIGNED [0 MOD 8] ost$cs_lock,
      plock: ost$cs_lock,
      sn_chain_table: array [1..mlc$max_sn_entry] of mlt$ant_index,
      next_free_ant_entry: mlt$ant_index,
      ant: array [1 .. mlc$max_ant_entries] of mlt$ant_entry,
      dust_id: ost$global_task_id,
      pspace: ALIGNED [0 MOD 32] HEAP (REP 5 of cell),
    recend;
