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 RosSymAllocMemKM(ULONG_PTR Size)23RosSymAllocMemKM(ULONG_PTR Size) 24 { 25 return ExAllocatePoolWithTag(NonPagedPool, Size, TAG_ROSSYM); 26 } 27 28 static VOID RosSymFreeMemKM(PVOID Area)29RosSymFreeMemKM(PVOID Area) 30 { 31 ExFreePool(Area); 32 } 33 34 VOID RosSymInitKernelMode(VOID)35RosSymInitKernelMode(VOID) 36 { 37 static ROSSYM_CALLBACKS KmCallbacks = 38 { 39 RosSymAllocMemKM, 40 RosSymFreeMemKM, 41 RosSymIoReadFile, 42 RosSymIoSeekFile 43 }; 44 45 RosSymInit(&KmCallbacks); 46 } 47 48 /* EOF */ 49