2005-01-06 13:58:04 +00:00
|
|
|
/* $Id$
|
2004-05-31 19:33:59 +00:00
|
|
|
*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS kernel
|
|
|
|
* FILE: lib/ntdll/rtl/libsup.c
|
|
|
|
* PURPOSE: Rtl library support routines
|
|
|
|
* PROGRAMMER: Gunnar Dalsnes
|
|
|
|
* UPDATE HISTORY:
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <ddk/ntddk.h>
|
|
|
|
#include <ntdll/rtl.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <ntos/minmax.h>
|
|
|
|
|
|
|
|
#define NDEBUG
|
|
|
|
#include <ntdll/ntdll.h>
|
|
|
|
|
|
|
|
/* FUNCTIONS ***************************************************************/
|
|
|
|
|
2005-04-01 00:04:15 +00:00
|
|
|
KPROCESSOR_MODE
|
|
|
|
RtlpGetMode()
|
|
|
|
{
|
|
|
|
return UserMode;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-05-31 19:33:59 +00:00
|
|
|
PVOID
|
|
|
|
STDCALL
|
|
|
|
ExAllocatePool(
|
|
|
|
IN POOL_TYPE PoolType,
|
|
|
|
IN SIZE_T Bytes
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return RtlAllocateHeap (
|
|
|
|
RtlGetProcessHeap (),
|
|
|
|
0,
|
|
|
|
Bytes);
|
|
|
|
}
|
|
|
|
|
|
|
|
PVOID
|
|
|
|
STDCALL
|
|
|
|
ExAllocatePoolWithTag(
|
|
|
|
IN POOL_TYPE PoolType,
|
|
|
|
IN SIZE_T Bytes,
|
|
|
|
IN ULONG Tag
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return RtlAllocateHeap (
|
|
|
|
RtlGetProcessHeap (),
|
|
|
|
0,
|
|
|
|
Bytes);
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
STDCALL
|
|
|
|
ExFreePool(IN PVOID Mem)
|
|
|
|
{
|
|
|
|
RtlFreeHeap (
|
|
|
|
RtlGetProcessHeap (),
|
|
|
|
0,
|
|
|
|
Mem);
|
|
|
|
}
|
2005-02-22 17:58:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef DBG
|
|
|
|
VOID FASTCALL
|
|
|
|
CHECK_PAGED_CODE_RTL(char *file, int line)
|
|
|
|
{
|
|
|
|
/* meaningless in user mode */
|
|
|
|
}
|
|
|
|
#endif
|