Implement RtlGetStackLimits() routine
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
2023-02-15 20:12:58 +01:00
parent d28687631b
commit b1c2b209e3
6 changed files with 113 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtoskrnl/rtl/i686/dispatch.c
* DESCRIPTION: Dispatching support for i686 architecture
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
*/
#include <xtos.h>
/**
* Returns the stack limits for the current thread.
*
* @param StackBase
* Supplies a pointer to memory area, where the stack base will be stored.
*
* @param StackLimit
* Suppliws a pointer to memory area, where the stack limit will be stored.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTAPI
VOID
RtlGetStackLimits(OUT PULONG_PTR StackBase,
OUT PULONG_PTR StackLimit)
{
PKTHREAD Thread = KeGetCurrentThread();
*StackBase = (ULONG_PTR)Thread->StackBase - sizeof(FX_SAVE_AREA);
*StackLimit = (ULONG_PTR)Thread->StackLimit;
}