Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
4.5 KiB

  1. ;
  2. ; EXPORT DATE: 9/11
  3. ;Equates for FASTOPEN.
  4. ;FASTOPEN NAME CACHING Subfunctions
  5. FONC_Look_up equ 1
  6. FONC_insert equ 2
  7. FONC_delete equ 3
  8. FONC_update equ 4
  9. FONC_purge equ 5 ;reserved for the future use.
  10. FONC_Rename equ 6 ;AN001
  11. ;FASTOPEN EXTENT CACHING Subfunctions
  12. FSK_Open equ 11 ;AN000;
  13. FSK_Close equ 12 ;AN000;
  14. FSK_Delete equ 13 ;AN000;
  15. FSK_Lookup equ 14 ;AN000;
  16. FSK_Insert equ 15 ;AN000;
  17. FSK_Trunc equ 16 ;AN000;
  18. HeaderSize equ 8 ; size of file header (8 bytes) ;AN000;
  19. ExtendSize equ 8 ; size of extend (8 bytes) ;AN000;
  20. Num_Of_Pages equ 1 ; number of pages ;AN000;
  21. Num_Of_Segs equ 2 ; number of frame segments ;AN000;
  22. Stayresident equ 04ch ; terminate and stay resident function code
  23. ;Equates used in DOS.
  24. FastOpen_Set equ 00000001B
  25. FastOpen_Reset equ 11111110B
  26. Lookup_Success equ 00000010B
  27. Lookup_Reset equ 11111101B
  28. Special_Fill_Set equ 00000100B
  29. Special_Fill_Reset equ 11111011B
  30. No_Lookup equ 00001000B
  31. Set_For_Search equ 00010000B ;DCR 167
  32. ;============= FastOpen Data Structures =====================
  33. Fastopen_Entry STRUC ;Fastopen Entry pointer in DOS
  34. Fastopen_Entry_size dw 4 ;size of the following
  35. Fastopen_Name_Caching dd ?
  36. ;Fastopen_FatChain_Caching dd ? ;reserved for future use
  37. Fastopen_Entry ENDS
  38. ;
  39. CMPCT_DIR_INFO STRUC ;compact version of Dir Info.
  40. CDI_file_name db 11 dup (' ')
  41. CDI_file_attr db ?
  42. CDI_codepage dw ?
  43. CDI_extcluster dw ?
  44. CDI_attr2 db ?
  45. CDI_time dw ?
  46. CDI_date dw ?
  47. CDI_cluster dw ?
  48. CDI_filesize dd ?
  49. CMPCT_DIR_INFO ENDS
  50. ;
  51. ORIG_DIR_INFO STRUC
  52. ODI_head db 17 dup (?)
  53. ODI_skip db 5 dup (0) ;reserved for DOS. FASTOPEN does not
  54. ODI_tail db 10 dup (?) ; use ODI_skip part.
  55. ORIG_DIR_INFO ENDS
  56. ;
  57. ODI_head_leng equ 17
  58. ODI_skip_leng equ 5
  59. ODI_tail_leng equ 10
  60. ;
  61. FASTOPEN_EXTENDED_INFO STRUC
  62. FEI_dirpos db 0
  63. FEI_dirsec dd 0
  64. FEI_clusnum dw 0
  65. FEI_lastent dw 0 ; for search first
  66. FEI_dirstart dw 0 ; for search first
  67. FASTOPEN_EXTENDED_INFO ENDS
  68. ;
  69. NAME_RECORD STRUC
  70. nLRU_ptr dw -1
  71. nMRU_ptr dw -1 ;reverse of nLRU_ptr
  72. nChild_ptr dw -1
  73. nSibling_ptr dw -1
  74. nBackward_ptr dw -1 ;points to preceding node
  75. nCmpct_Dir_Info db size Cmpct_Dir_Info dup (' ')
  76. nExtended_Info db size Fastopen_Extended_Info dup (?)
  77. NAME_RECORD ENDS
  78. ;
  79. DRIVE_CACHE_HEADER STRUC ;drive cache header
  80. DCH_LRU_ROOT dw 0 ;Header of the LRU chain of this drive
  81. DCH_MRU_ROOT dw 0 ;offset to the last entry of LRU chain
  82. DCH_Child_ptr dw -1 ;the first child in Name cache seg.
  83. DCH_Sibling_ptr dw -1 ;points to the next drive cache header
  84. DCH_Drive_letter db 'C' ;drive letter
  85. DCH_Num_Entries dw 0 ;Number of entries in the Name cache.
  86. DCH_Name_Buff dw 0 ;pointer to name cahe buffer
  87. DRIVE_CACHE_HEADER ENDS
  88. ;
  89. ;======== FAST SEEK FUNCTION DATA STRUCTURES =======================
  90. DRIVE_HEADER STRUC ; Drive header structure ;AN000;
  91. Drive_Number dw 0 ; drive number ;AN000;
  92. Extent_Count dw 0 ; reserved for debugging
  93. MRU_Hdr_Ptr dw 0 ; pointer to OPEN Queue
  94. Free_ptr dw 0 ; pointer to FREE buffer ;AN000;
  95. Close_Ptr dw 0 ; pointer to CLOSE Queue ;AN000;
  96. Buff_Size dw 0 ; cache buffer size including header ;AN000;
  97. Free_Size dw 0 ; size of Free area in bytes
  98. Next_Drv_Hdr_Ptr dw 0 ; pointer to next drive header
  99. DRIVE_HEADER ENDS
  100. FILE_HEADER STRUC ; File header structure ;AN000;
  101. FH_Phys_Clus_Num dw 0 ; starting physcial clustnum of file ;AN000;
  102. FH_Refer_Count dw 0 ; reference count ;AN000;
  103. FH_Next_Extn_Ptr dw 0 ; pointer to first extent of the file;AN000;
  104. FH_Next_Hdr_Ptr dw 0 ; pointer to next file header ;AN000;
  105. FH_MRU_Extn_Ptr dw 0 ; pointer to MRU extent
  106. dw 0
  107. dw 0
  108. dw 0
  109. FILE_HEADER ENDS ;AN000;
  110. EXTENT_HEADER STRUC ; extend header structure ;AN000;
  111. EH_Logic_Clus_Num dw 0 ; starting logical clus num of extent;AN000;
  112. EH_Phys_Clus_Num dw 0 ; starting physical clus numof extnt;AN000;
  113. EH_Count dw 0 ; range of logical clusnum in the extnt
  114. EH_Next_Extn_Ptr dw 0 ; pointer to next extent ;AN000;
  115. EH_Prev_Extn_Ptr dw 0 ; pointer to previous extent ;AN000;
  116. EH_Next_LRU_Ptr dw 0 ; pointer to next LRU extent
  117. EH_Prev_LRU_Ptr dw 0 ; pointer tp previous LRU extent
  118. dw 0
  119. EXTENT_HEADER ENDS
  120.