Move RtlFillMemory() routine to ntosdrv driver
This commit is contained in:
parent
246968045a
commit
477e56e294
@ -7,7 +7,8 @@ include_directories(
|
|||||||
|
|
||||||
# Specify list of source code files
|
# Specify list of source code files
|
||||||
list(APPEND NTOSDRV_SOURCE
|
list(APPEND NTOSDRV_SOURCE
|
||||||
${NTOSDRV_SOURCE_DIR}/ntosdrv.c)
|
${NTOSDRV_SOURCE_DIR}/ntosdrv.c
|
||||||
|
${NTOSDRV_SOURCE_DIR}/rtl.c)
|
||||||
|
|
||||||
# Set module definition SPEC file
|
# Set module definition SPEC file
|
||||||
set_specfile(ntosdrv.spec ntosdrv.sys)
|
set_specfile(ntosdrv.spec ntosdrv.sys)
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
# NT compatibilty layer exports
|
# NT compatibilty layer exports
|
||||||
@ fastcall ExRundownCompleted(ptr) ExCompleteRundownProtection
|
@ fastcall ExRundownCompleted(ptr) ExCompleteRundownProtection
|
||||||
|
@ stdcall RtlFillMemory(ptr long long)
|
||||||
|
36
drivers/ntosdrv/rtl.c
Normal file
36
drivers/ntosdrv/rtl.c
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/**
|
||||||
|
* PROJECT: ExectOS
|
||||||
|
* COPYRIGHT: See COPYING.md in the top level directory
|
||||||
|
* FILE: drivers/ntosdrv/rtl.c
|
||||||
|
* DESCRIPTION: NTOS compatibility driver runtime library
|
||||||
|
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <xtkmapi.h>
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This routine fills a section of memory with a specified byte.
|
||||||
|
*
|
||||||
|
* @param Destination
|
||||||
|
* Supplies a pointer to the buffer to fill.
|
||||||
|
*
|
||||||
|
* @param Length
|
||||||
|
* Specifies a number of bytes to store in memory.
|
||||||
|
*
|
||||||
|
* @param Byte
|
||||||
|
* Supplies a pattern to fill memory.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since NT 3.5
|
||||||
|
*/
|
||||||
|
XTAPI
|
||||||
|
VOID
|
||||||
|
RtlFillMemory(OUT PVOID Destination,
|
||||||
|
IN SIZE_T Length,
|
||||||
|
IN UCHAR Byte)
|
||||||
|
{
|
||||||
|
/* Fill the buffer with specified byte */
|
||||||
|
RtlSetMemory(Destination, Byte, Length);
|
||||||
|
}
|
@ -116,13 +116,6 @@ RtlDivideLargeInteger(IN LARGE_INTEGER Dividend,
|
|||||||
IN ULONG Divisor,
|
IN ULONG Divisor,
|
||||||
OUT PULONG Remainder);
|
OUT PULONG Remainder);
|
||||||
|
|
||||||
|
|
||||||
XTAPI
|
|
||||||
VOID
|
|
||||||
RtlFillMemory(OUT PVOID Destination,
|
|
||||||
IN SIZE_T Length,
|
|
||||||
IN UCHAR Value);
|
|
||||||
|
|
||||||
XTAPI
|
XTAPI
|
||||||
XTSTATUS
|
XTSTATUS
|
||||||
RtlFormatWideString(IN PRTL_PRINT_CONTEXT Context,
|
RtlFormatWideString(IN PRTL_PRINT_CONTEXT Context,
|
||||||
|
@ -87,32 +87,6 @@ RtlCopyMemory(OUT PVOID Destination,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This routine fills a section of memory with a specified byte.
|
|
||||||
*
|
|
||||||
* @param Destination
|
|
||||||
* Supplies a pointer to the buffer to fill.
|
|
||||||
*
|
|
||||||
* @param Length
|
|
||||||
* Specifies a number of bytes to store in memory.
|
|
||||||
*
|
|
||||||
* @param Byte
|
|
||||||
* Supplies a pattern to fill memory.
|
|
||||||
*
|
|
||||||
* @return This routine does not return any value.
|
|
||||||
*
|
|
||||||
* @since NT 3.5
|
|
||||||
*/
|
|
||||||
XTAPI
|
|
||||||
VOID
|
|
||||||
RtlFillMemory(OUT PVOID Destination,
|
|
||||||
IN SIZE_T Length,
|
|
||||||
IN UCHAR Byte)
|
|
||||||
{
|
|
||||||
/* Fill the buffer with specified byte */
|
|
||||||
RtlSetMemory(Destination, Byte, Length);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This routine copies a block of memory either forward of backward, depeding
|
* This routine copies a block of memory either forward of backward, depeding
|
||||||
* if source and destination buffers overlap or not.
|
* if source and destination buffers overlap or not.
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
@ stdcall RtlConvertToLargeIntegerUnsigned32(long)
|
@ stdcall RtlConvertToLargeIntegerUnsigned32(long)
|
||||||
@ stdcall RtlCopyMemory(ptr ptr long)
|
@ stdcall RtlCopyMemory(ptr ptr long)
|
||||||
@ stdcall RtlDivideLargeInteger(long long long ptr)
|
@ stdcall RtlDivideLargeInteger(long long long ptr)
|
||||||
@ stdcall RtlFillMemory(ptr long long)
|
|
||||||
@ stdcall RtlMoveMemory(ptr ptr long)
|
@ stdcall RtlMoveMemory(ptr ptr long)
|
||||||
@ stdcall RtlMultiplyLargeInteger(long long long)
|
@ stdcall RtlMultiplyLargeInteger(long long long)
|
||||||
@ stdcall RtlReadRegisterByte(ptr)
|
@ stdcall RtlReadRegisterByte(ptr)
|
||||||
|
Loading…
Reference in New Issue
Block a user