Implement RtlCompareGuids() kernel routine
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 25s
Builds / ExectOS (i686) (push) Successful in 26s

This commit is contained in:
Rafal Kupiec 2024-01-31 16:08:06 +01:00
parent 48d1e7f04c
commit 8e61503de1
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
4 changed files with 33 additions and 0 deletions

View File

@ -48,6 +48,11 @@ RtlRemoveEntryList(IN PLIST_ENTRY Entry);
/* Runtime Library routines forward references */
XTAPI
BOOLEAN
RtlCompareGuids(IN PGUID Guid1,
IN PGUID Guid2);
XTAPI
SIZE_T
RtlCompareMemory(IN PCVOID LeftBuffer,

View File

@ -41,6 +41,7 @@ list(APPEND XTOSKRNL_SOURCE
${XTOSKRNL_SOURCE_DIR}/po/idle.c
${XTOSKRNL_SOURCE_DIR}/rtl/atomic.c
${XTOSKRNL_SOURCE_DIR}/rtl/byteswap.c
${XTOSKRNL_SOURCE_DIR}/rtl/guid.c
${XTOSKRNL_SOURCE_DIR}/rtl/ioreg.c
${XTOSKRNL_SOURCE_DIR}/rtl/memory.c
${XTOSKRNL_SOURCE_DIR}/rtl/plist.c

26
xtoskrnl/rtl/guid.c Normal file
View File

@ -0,0 +1,26 @@
/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtoskrnl/rtl/guid.c
* DESCRIPTION: GUID manipulation routines
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
*/
#include <xtos.h>
XTAPI
BOOLEAN
RtlCompareGuids(IN PGUID Guid1,
IN PGUID Guid2)
{
PUINT Guid1Ptr, Guid2Ptr;
/* Cast GUIDs to UINT to compare 32-bits at a time */
Guid1Ptr = (PUINT)Guid1;
Guid2Ptr = (PUINT)Guid2;
/* Compare GUIDs */
return(Guid1Ptr[0] == Guid2Ptr[0] && Guid1Ptr[1] == Guid2Ptr[1] &&
Guid1Ptr[2] == Guid2Ptr[2] && Guid1Ptr[3] == Guid2Ptr[3]);
}

View File

@ -23,6 +23,7 @@
@ stdcall KeSetTargetProcessorDpc(ptr long)
@ stdcall KeSignalCallDpcDone(ptr)
@ stdcall KeSignalCallDpcSynchronize(ptr)
@ stdcall RtlCompareGuids(ptr ptr)
@ stdcall RtlCompareMemory(ptr ptr long)
@ stdcall RtlCopyMemory(ptr ptr long)
@ stdcall RtlFillMemory(ptr long long)