+IoGetStackLimits()
authorshort <>
Tue, 5 Nov 2002 13:36:15 +0000 (13:36 +0000)
committershort <>
Tue, 5 Nov 2002 13:36:15 +0000 (13:36 +0000)
src/libcaptive/io/process.c [new file with mode: 0644]
src/libcaptive/ke/exports.captivesym

diff --git a/src/libcaptive/io/process.c b/src/libcaptive/io/process.c
new file mode 100644 (file)
index 0000000..7e3c96b
--- /dev/null
@@ -0,0 +1,42 @@
+/* $Id$
+ * reactos spinlock emulation of libcaptive
+ * Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; exactly version 2 of June 1991 is required
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+#include "config.h"
+
+#include "reactos/ddk/iofuncs.h"       /* self */
+#include <glib/gmessages.h>
+
+
+/**
+ * IoGetStackLimits:
+ * @LowLimit: Returns the bottom limit for the current stack pointer.
+ * @HighLimit: Returns the top limit for the current stack pointer.
+ *
+ * Returns the boundaries for the current stack pointer (address space
+ * of automatic variables). libcaptive returns the whole UNIX process
+ * address space without some safety boundary space (64KB now).
+ */
+VOID IoGetStackLimits(OUT PULONG LowLimit,OUT PULONG HighLimit)
+{
+       g_return_if_fail(LowLimit!=NULL);
+       g_return_if_fail(HighLimit!=NULL);
+
+       *LowLimit =(ULONG) 0x10000;     /* 64KB */
+       *HighLimit=(ULONG)-0x10000;     /* 64KB */
+}
index feeae6a..671fa1d 100644 (file)
@@ -30,7 +30,7 @@ ntoskrnl.exe  KeBugCheckEx    undef
 ntoskrnl.exe   FsRtlIsNtstatusExpected undef
 ntoskrnl.exe   IofCompleteRequest      undef
 ntoskrnl.exe   IoSetTopLevelIrp        undef
-ntoskrnl.exe   IoGetStackLimits        undef
+ntoskrnl.exe   IoGetStackLimits
 ntoskrnl.exe   IoGetTopLevelIrp
 ntoskrnl.exe   FsRtlFastCheckLockForRead       undef
 ntoskrnl.exe   IoGetCurrentProcess     undef