3eefc92020b30977afc0585601063d0b722283cb
[reactos.git] / reactos / ntoskrnl / cc / cacheman.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: ntoskrnl/cc/cacheman.c
5 * PURPOSE: Cache manager
6 *
7 * PROGRAMMERS: David Welch (welch@cwcom.net)
8 */
9
10 /* INCLUDES *****************************************************************/
11
12 #include <ntoskrnl.h>
13 #define NDEBUG
14 #include <debug.h>
15
16 PFSN_PREFETCHER_GLOBALS CcPfGlobals;
17
18 /* FUNCTIONS *****************************************************************/
19
20 VOID
21 NTAPI
22 INIT_FUNCTION
23 CcPfInitializePrefetcher(VOID)
24 {
25 /* Notify debugger */
26 DbgPrintEx(DPFLTR_PREFETCHER_ID,
27 DPFLTR_TRACE_LEVEL,
28 "CCPF: InitializePrefetecher()\n");
29
30 /* Setup the Prefetcher Data */
31 InitializeListHead(&CcPfGlobals.ActiveTraces);
32 InitializeListHead(&CcPfGlobals.CompletedTraces);
33 ExInitializeFastMutex(&CcPfGlobals.CompletedTracesLock);
34
35 /* FIXME: Setup the rest of the prefetecher */
36 }
37
38 BOOLEAN
39 NTAPI
40 INIT_FUNCTION
41 CcInitializeCacheManager(VOID)
42 {
43 CcInitView();
44 return TRUE;
45 }
46
47 /*
48 * @unimplemented
49 */
50 LARGE_INTEGER
51 NTAPI
52 CcGetFlushedValidData (
53 IN PSECTION_OBJECT_POINTERS SectionObjectPointer,
54 IN BOOLEAN BcbListHeld
55 )
56 {
57 LARGE_INTEGER i;
58
59 UNIMPLEMENTED;
60
61 i.QuadPart = 0;
62 return i;
63 }
64
65 /*
66 * @unimplemented
67 */
68 PVOID
69 NTAPI
70 CcRemapBcb (
71 IN PVOID Bcb
72 )
73 {
74 UNIMPLEMENTED;
75
76 return 0;
77 }
78
79 /*
80 * @unimplemented
81 */
82 VOID
83 NTAPI
84 CcScheduleReadAhead (
85 IN PFILE_OBJECT FileObject,
86 IN PLARGE_INTEGER FileOffset,
87 IN ULONG Length
88 )
89 {
90 UNIMPLEMENTED;
91 }
92
93 /*
94 * @unimplemented
95 */
96 VOID
97 NTAPI
98 CcSetAdditionalCacheAttributes (
99 IN PFILE_OBJECT FileObject,
100 IN BOOLEAN DisableReadAhead,
101 IN BOOLEAN DisableWriteBehind
102 )
103 {
104 CCTRACE(CC_API_DEBUG, "FileObject=%p DisableReadAhead=%d DisableWriteBehind=%d\n",
105 FileObject, DisableReadAhead, DisableWriteBehind);
106
107 UNIMPLEMENTED;
108 }
109
110 /*
111 * @unimplemented
112 */
113 VOID
114 NTAPI
115 CcSetBcbOwnerPointer (
116 IN PVOID Bcb,
117 IN PVOID Owner
118 )
119 {
120 CCTRACE(CC_API_DEBUG, "Bcb=%p Owner=%p\n",
121 Bcb, Owner);
122
123 UNIMPLEMENTED;
124 }
125
126 /*
127 * @unimplemented
128 */
129 VOID
130 NTAPI
131 CcSetDirtyPageThreshold (
132 IN PFILE_OBJECT FileObject,
133 IN ULONG DirtyPageThreshold
134 )
135 {
136 CCTRACE(CC_API_DEBUG, "FileObject=%p DirtyPageThreshold=%lu\n",
137 FileObject, DirtyPageThreshold);
138
139 UNIMPLEMENTED;
140 }
141
142 /*
143 * @unimplemented
144 */
145 VOID
146 NTAPI
147 CcSetReadAheadGranularity (
148 IN PFILE_OBJECT FileObject,
149 IN ULONG Granularity
150 )
151 {
152 CCTRACE(CC_API_DEBUG, "FileObject=%p Granularity=%lu\n",
153 FileObject, Granularity);
154
155 UNIMPLEMENTED;
156 }