ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

cc.h
Go to the documentation of this file.
00001 #pragma once
00002 
00003 typedef struct _PF_SCENARIO_ID
00004 {
00005     WCHAR ScenName[30];
00006     ULONG HashId;
00007 } PF_SCENARIO_ID, *PPF_SCENARIO_ID;
00008 
00009 typedef struct _PF_LOG_ENTRY
00010 {
00011     ULONG FileOffset:30;
00012     ULONG Type:2;
00013     union
00014     {
00015         ULONG FileKey;
00016         ULONG FileSequenceNumber;
00017     };
00018 } PF_LOG_ENTRY, *PPF_LOG_ENTRY;
00019 
00020 typedef struct _PFSN_LOG_ENTRIES
00021 {
00022     LIST_ENTRY TraceBuffersLink;
00023     LONG NumEntries;
00024     LONG MaxEntries;
00025     PF_LOG_ENTRY Entries[ANYSIZE_ARRAY];
00026 } PFSN_LOG_ENTRIES, *PPFSN_LOG_ENTRIES;
00027 
00028 typedef struct _PF_SECTION_INFO
00029 {
00030     ULONG FileKey;
00031     ULONG FileSequenceNumber;
00032     ULONG FileIdLow;
00033     ULONG FileIdHigh;
00034 } PF_SECTION_INFO, *PPF_SECTION_INFO;
00035 
00036 typedef struct _PF_TRACE_HEADER
00037 {
00038     ULONG Version;
00039     ULONG MagicNumber;
00040     ULONG Size;
00041     PF_SCENARIO_ID ScenarioId;
00042     ULONG ScenarioType; // PF_SCENARIO_TYPE
00043     ULONG EventEntryIdxs[8];
00044     ULONG NumEventEntryIdxs;
00045     ULONG TraceBufferOffset;
00046     ULONG NumEntries;
00047     ULONG SectionInfoOffset;
00048     ULONG NumSections;
00049     ULONG FaultsPerPeriod[10];
00050     LARGE_INTEGER LaunchTime;
00051     ULONGLONG Reserved[5];
00052 } PF_TRACE_HEADER, *PPF_TRACE_HEADER;
00053 
00054 typedef struct _PFSN_TRACE_DUMP
00055 {
00056     LIST_ENTRY CompletedTracesLink;
00057     PF_TRACE_HEADER Trace;
00058 } PFSN_TRACE_DUMP, *PPFSN_TRACE_DUMP;
00059 
00060 typedef struct _PFSN_TRACE_HEADER
00061 {
00062     ULONG Magic;
00063     LIST_ENTRY ActiveTracesLink;
00064     PF_SCENARIO_ID ScenarioId;
00065     ULONG ScenarioType; // PF_SCENARIO_TYPE
00066     ULONG EventEntryIdxs[8];
00067     ULONG NumEventEntryIdxs;
00068     PPFSN_LOG_ENTRIES CurrentTraceBuffer;
00069     LIST_ENTRY TraceBuffersList;
00070     ULONG NumTraceBuffers;
00071     KSPIN_LOCK TraceBufferSpinLock;
00072     KTIMER TraceTimer;
00073     LARGE_INTEGER TraceTimerPeriod;
00074     KDPC TraceTimerDpc;
00075     KSPIN_LOCK TraceTimerSpinLock;
00076     ULONG FaultsPerPeriod[10];
00077     LONG LastNumFaults;
00078     LONG CurPeriod;
00079     LONG NumFaults;
00080     LONG MaxFaults;
00081     PEPROCESS Process;
00082     EX_RUNDOWN_REF RefCount;
00083     WORK_QUEUE_ITEM EndTraceWorkItem;
00084     LONG EndTraceCalled;
00085     PPFSN_TRACE_DUMP TraceDump;
00086     NTSTATUS TraceDumpStatus;
00087     LARGE_INTEGER LaunchTime;
00088     PPF_SECTION_INFO SectionInfo;
00089     ULONG SectionInfoCount;
00090 } PFSN_TRACE_HEADER, *PPFSN_TRACE_HEADER;
00091 
00092 typedef struct _PFSN_PREFETCHER_GLOBALS
00093 {
00094     LIST_ENTRY ActiveTraces;
00095     KSPIN_LOCK ActiveTracesLock;
00096     PPFSN_TRACE_HEADER SystemWideTrace;
00097     LIST_ENTRY CompletedTraces;
00098     FAST_MUTEX CompletedTracesLock;
00099     LONG NumCompletedTraces;
00100     PKEVENT CompletedTracesEvent;
00101     LONG ActivePrefetches;
00102 } PFSN_PREFETCHER_GLOBALS, *PPFSN_PREFETCHER_GLOBALS;
00103 
00104 typedef struct _BCB
00105 {
00106     LIST_ENTRY BcbSegmentListHead;
00107     LIST_ENTRY BcbRemoveListEntry;
00108     BOOLEAN RemoveOnClose;
00109     ULONG TimeStamp;
00110     PFILE_OBJECT FileObject;
00111     ULONG CacheSegmentSize;
00112     LARGE_INTEGER AllocationSize;
00113     LARGE_INTEGER FileSize;
00114     PCACHE_MANAGER_CALLBACKS Callbacks;
00115     PVOID LazyWriteContext;
00116     KSPIN_LOCK BcbLock;
00117     ULONG RefCount;
00118 #if DBG
00119     BOOLEAN Trace; /* enable extra trace output for this BCB and it's cache segments */
00120 #endif
00121 } BCB, *PBCB;
00122 
00123 typedef struct _CACHE_SEGMENT
00124 {
00125     /* Base address of the region where the cache segment data is mapped. */
00126     PVOID BaseAddress;
00127     /*
00128      * Memory area representing the region where the cache segment data is
00129      * mapped.
00130      */
00131     struct _MEMORY_AREA* MemoryArea;
00132     /* Are the contents of the cache segment data valid. */
00133     BOOLEAN Valid;
00134     /* Are the contents of the cache segment data newer than those on disk. */
00135     BOOLEAN Dirty;
00136     /* Page out in progress */
00137     BOOLEAN PageOut;
00138     ULONG MappedCount;
00139     /* Entry in the list of segments for this BCB. */
00140     LIST_ENTRY BcbSegmentListEntry;
00141     /* Entry in the list of segments which are dirty. */
00142     LIST_ENTRY DirtySegmentListEntry;
00143     /* Entry in the list of segments. */
00144     LIST_ENTRY CacheSegmentListEntry;
00145     LIST_ENTRY CacheSegmentLRUListEntry;
00146     /* Offset in the file which this cache segment maps. */
00147     ULONG FileOffset;
00148     /* Mutex */
00149     KMUTEX Mutex;
00150     /* Number of references. */
00151     ULONG ReferenceCount;
00152     /* Pointer to the BCB for the file which this cache segment maps data for. */
00153     PBCB Bcb;
00154     /* Pointer to the next cache segment in a chain. */
00155     struct _CACHE_SEGMENT* NextInChain;
00156 } CACHE_SEGMENT, *PCACHE_SEGMENT;
00157 
00158 typedef struct _INTERNAL_BCB
00159 {
00160     PUBLIC_BCB PFCB;
00161     PCACHE_SEGMENT CacheSegment;
00162     BOOLEAN Dirty;
00163     CSHORT RefCount; /* (At offset 0x34 on WinNT4) */
00164 } INTERNAL_BCB, *PINTERNAL_BCB;
00165 
00166 VOID
00167 NTAPI
00168 CcPfInitializePrefetcher(
00169     VOID
00170 );
00171 
00172 VOID
00173 NTAPI
00174 CcMdlReadComplete2(
00175     IN PMDL MemoryDescriptorList,
00176     IN PFILE_OBJECT FileObject
00177 );
00178 
00179 VOID
00180 NTAPI
00181 CcMdlWriteComplete2(
00182     IN PFILE_OBJECT FileObject,
00183     IN PLARGE_INTEGER FileOffset,
00184     IN PMDL MdlChain
00185 );
00186 
00187 NTSTATUS
00188 NTAPI
00189 CcRosFlushCacheSegment(PCACHE_SEGMENT CacheSegment);
00190 
00191 NTSTATUS
00192 NTAPI
00193 CcRosGetCacheSegment(
00194     PBCB Bcb,
00195     ULONG FileOffset,
00196     PULONG BaseOffset,
00197     PVOID *BaseAddress,
00198     PBOOLEAN UptoDate,
00199     PCACHE_SEGMENT *CacheSeg
00200 );
00201 
00202 VOID
00203 NTAPI
00204 CcInitView(VOID);
00205 
00206 NTSTATUS
00207 NTAPI
00208 CcRosFreeCacheSegment(
00209     PBCB,
00210     PCACHE_SEGMENT
00211 );
00212 
00213 NTSTATUS
00214 NTAPI
00215 ReadCacheSegment(PCACHE_SEGMENT CacheSeg);
00216 
00217 NTSTATUS
00218 NTAPI
00219 WriteCacheSegment(PCACHE_SEGMENT CacheSeg);
00220 
00221 BOOLEAN
00222 NTAPI
00223 CcInitializeCacheManager(VOID);
00224 
00225 NTSTATUS
00226 NTAPI
00227 CcRosUnmapCacheSegment(
00228     PBCB Bcb,
00229     ULONG FileOffset,
00230     BOOLEAN NowDirty
00231 );
00232 
00233 PCACHE_SEGMENT
00234 NTAPI
00235 CcRosLookupCacheSegment(
00236     PBCB Bcb,
00237     ULONG FileOffset
00238 );
00239 
00240 NTSTATUS
00241 NTAPI
00242 CcRosGetCacheSegmentChain(
00243     PBCB Bcb,
00244     ULONG FileOffset,
00245     ULONG Length,
00246     PCACHE_SEGMENT* CacheSeg
00247 );
00248 
00249 VOID
00250 NTAPI
00251 CcInitCacheZeroPage(VOID);
00252 
00253 NTSTATUS
00254 NTAPI
00255 CcRosMarkDirtyCacheSegment(
00256     PBCB Bcb,
00257     ULONG FileOffset
00258 );
00259 
00260 NTSTATUS
00261 NTAPI
00262 CcRosFlushDirtyPages(
00263     ULONG Target,
00264     PULONG Count,
00265     BOOLEAN Wait
00266 );
00267 
00268 VOID
00269 NTAPI
00270 CcRosDereferenceCache(PFILE_OBJECT FileObject);
00271 
00272 VOID
00273 NTAPI
00274 CcRosReferenceCache(PFILE_OBJECT FileObject);
00275 
00276 VOID
00277 NTAPI
00278 CcRosSetRemoveOnClose(PSECTION_OBJECT_POINTERS SectionObjectPointer);
00279 
00280 NTSTATUS
00281 NTAPI
00282 CcRosReleaseCacheSegment(
00283     BCB* Bcb,
00284     CACHE_SEGMENT *CacheSeg,
00285     BOOLEAN Valid,
00286     BOOLEAN Dirty,
00287     BOOLEAN Mapped
00288 );
00289 
00290 NTSTATUS
00291 NTAPI
00292 CcRosRequestCacheSegment(
00293     BCB *Bcb,
00294     ULONG FileOffset,
00295     PVOID* BaseAddress,
00296     PBOOLEAN UptoDate,
00297     CACHE_SEGMENT **CacheSeg
00298 );
00299 
00300 NTSTATUS
00301 NTAPI
00302 CcRosInitializeFileCache(
00303     PFILE_OBJECT FileObject,
00304     ULONG CacheSegmentSize,
00305     PCACHE_MANAGER_CALLBACKS CallBacks,
00306     PVOID LazyWriterContext
00307 );
00308 
00309 NTSTATUS
00310 NTAPI
00311 CcRosReleaseFileCache(
00312     PFILE_OBJECT FileObject
00313 );
00314 
00315 NTSTATUS
00316 NTAPI
00317 CcTryToInitializeFileCache(PFILE_OBJECT FileObject);

Generated on Sun May 27 2012 04:36:04 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.