[NTOSKRNL]
[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 PINTERNAL_BCB iBcb = Bcb;
121
122 CCTRACE(CC_API_DEBUG, "Bcb=%p Owner=%p\n",
123 Bcb, Owner);
124
125 if (iBcb->OwnerPointer)
126 DPRINT1("OwnerPointer was already set?! Old: %p, New: %p\n", iBcb->OwnerPointer, Owner);
127 iBcb->OwnerPointer = Owner;
128 }
129
130 /*
131 * @unimplemented
132 */
133 VOID
134 NTAPI
135 CcSetDirtyPageThreshold (
136 IN PFILE_OBJECT FileObject,
137 IN ULONG DirtyPageThreshold
138 )
139 {
140 CCTRACE(CC_API_DEBUG, "FileObject=%p DirtyPageThreshold=%lu\n",
141 FileObject, DirtyPageThreshold);
142
143 UNIMPLEMENTED;
144 }
145
146 /*
147 * @unimplemented
148 */
149 VOID
150 NTAPI
151 CcSetReadAheadGranularity (
152 IN PFILE_OBJECT FileObject,
153 IN ULONG Granularity
154 )
155 {
156 CCTRACE(CC_API_DEBUG, "FileObject=%p Granularity=%lu\n",
157 FileObject, Granularity);
158
159 UNIMPLEMENTED;
160 }