a50680e11da7b4d9a5e9a679abf14849d789d445
[reactos.git] / reactos / lib / rossym / initkm.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: lib/rossym/initkm.c
5 * PURPOSE: Initialize library for use in kernel mode
6 *
7 * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com)
8 */
9
10 #include <ntdef.h>
11 #undef DECLSPEC_IMPORT
12 #define DECLSPEC_IMPORT
13 #include <ntddk.h>
14 #include <reactos/rossym.h>
15 #include "rossympriv.h"
16
17 #define NDEBUG
18 #include <debug.h>
19
20 #define TAG_ROSSYM 'MYSR'
21
22 static PVOID
23 RosSymAllocMemKM(ULONG_PTR Size)
24 {
25 return ExAllocatePoolWithTag(NonPagedPool, Size, TAG_ROSSYM);
26 }
27
28 static VOID
29 RosSymFreeMemKM(PVOID Area)
30 {
31 ExFreePool(Area);
32 }
33
34 VOID
35 RosSymInitKernelMode(VOID)
36 {
37 static ROSSYM_CALLBACKS KmCallbacks =
38 {
39 RosSymAllocMemKM,
40 RosSymFreeMemKM,
41 RosSymZwReadFile,
42 RosSymZwSeekFile
43 };
44
45 RosSymInit(&KmCallbacks);
46 }
47
48 /* EOF */