
{  This deck defines the SDTX used by Segment Manager.
{
{ NOTE: If TYPE declarations or record fields are added/changed/deleted, please
{   make the appropriate changes in the corresponding display procedures in the
{   module(s) for the System Core Debugger: SYM$DEBUG, SYM$DEBUG1
{


  TYPE
    mmt$segment_descriptor_extended = record
      open_validating_ring_number: ost$ring,
      access_state: mmt$segment_access_state,
      sfid: gft$system_file_identifier,
      inheritance: mmt$segment_inheritance,
      segment_reservation_state: mmt$segment_reservation_state,
      software_attribute_set: mmt$software_attribute_set,
      access_rights: mmt$segment_access_rights,
      segment_lock: mmt$lock_segment_status,
      shadow_info: mmt$shadow_info,
      file_limits_enforced: sft$file_space_limit_kind,
      stream: mmt$sdtx_stream_data,
*IF $true(osv$unix)
      assign_active: 0 .. osc$max_segment_length,
*ELSE
      assign_active: 0 .. osc$max_segment_length + 1,
*IFEND
    recend,

    mmt$sdtx_stream_data = PACKED RECORD
      last_page_fault: ost$segment_offset,
      sequential_accesses: 0..255,
      transfer_size: 0..15, {size= (2**(transfer_size)) * osv$page_size)
      random_faults: 0..15,
      streaming: boolean,
      transfer_size_specified: boolean,
      preset_streaming: boolean,
    RECEND,

{ For performance, the adaptable size table will be used only for allocation.
{ All other references to the sdtx will use the fixed size array.

    mmt$segment_descriptor_table_ex = record
      sdtx_table: array [0 .. * ] of mmt$segment_descriptor_extended,
    recend,

    mmt$max_sdtx = record
      sdtx_table: array [0 .. 4095] of mmt$segment_descriptor_extended,
    recend,

    mmt$max_sdtx_p = ^mmt$max_sdtx;


{ Constants for referencing SDTX.ASSIGN_ACTIVE. Note a value < mmc$assign_active_null is a valid
{ assign for the offset specified by <assign_sctive>.

  CONST
*IF $true(osv$unix)
    mmc$assign_active_null = osc$max_segment_length - 1,
*ELSE
    mmc$assign_active_null = osc$max_segment_length,
*IFEND
    mmc$assign_active_escaped = mmc$assign_active_null + 1;


*copyc gft$system_file_identifier
*copyc mmt$segment_inheritance
*copyc mmt$attribute_keyword
*copyc MMT$LUS_DECLARATIONS
*copyc MMT$SEGMENT_ACCESS_RIGHTS
*copyc MMT$SEGMENT_ACCESS_STATE
*copyc mmt$shadow_info
*copyc MMT$LOCK_SEGMENT_STATUS
*copyc mmt$segment_access_state
*copyc mmt$segment_reservation_state
*copyc MMT$SHADOW_SEGMENT_KIND
*copyc OSD$VIRTUAL_ADDRESS
*copyc SFT$FILE_SPACE_LIMIT_KIND
