move chkstk.s from ntdll to rtl because _alloca_probe needs to be exported by ntoskrnl as well
Modified: trunk/reactos/lib/ntdll/makefile
Deleted: trunk/reactos/lib/ntdll/rtl/i386/chkstk.s
Added: trunk/reactos/lib/rtl/i386/chkstk.s
Modified: trunk/reactos/lib/rtl/makefile
Modified: trunk/reactos/ntoskrnl/ntoskrnl.def

Modified: trunk/reactos/lib/ntdll/makefile
--- trunk/reactos/lib/ntdll/makefile	2005-03-29 02:09:42 UTC (rev 14378)
+++ trunk/reactos/lib/ntdll/makefile	2005-03-29 14:27:46 UTC (rev 14379)
@@ -59,7 +59,6 @@
 	rtl/i386/aulldiv.o \
 	rtl/i386/aullrem.o \
 	rtl/i386/aullshr.o \
-	rtl/i386/chkstk.o \
 	rtl/i386/float.o \
 	rtl/i386/ftol.o
 

Deleted: trunk/reactos/lib/ntdll/rtl/i386/chkstk.s
--- trunk/reactos/lib/ntdll/rtl/i386/chkstk.s	2005-03-29 02:09:42 UTC (rev 14378)
+++ trunk/reactos/lib/ntdll/rtl/i386/chkstk.s	2005-03-29 14:27:46 UTC (rev 14379)
@@ -1,66 +0,0 @@
-/* $Id$
- *
- * COPYRIGHT:         See COPYING in the top level directory
- * PROJECT:           ReactOS kernel
- * PURPOSE:           Stack checker
- * FILE:              lib/ntdll/rtl/i386/chkstk.s
- * PROGRAMER:         KJK::Hyperion <noog@libero.it>
- */
-
-.globl __chkstk
-.globl __alloca_probe
-
-/*
- _chkstk() is called by all stack allocations of more than 4 KB. It grows the
- stack in areas of 4 KB each, trying to access each area. This ensures that the
- guard page for the stack is hit, and the stack growing triggered
- */
-__chkstk:
-__alloca_probe:
-
-/* EAX = size to be allocated */
-/* save the ECX register */
- pushl %ecx
-
-/* ECX = top of the previous stack frame */
- leal 8(%esp), %ecx
-
-/* probe the desired memory, page by page */
- cmpl $0x1000, %eax
- jge .l_MoreThanAPage
- jmp .l_LessThanAPage
-
-.l_MoreThanAPage:
-
-/* raise the top of the stack by a page and probe */
- subl $0x1000, %ecx
- testl %eax, 0(%ecx)
-
-/* loop if still more than a page must be probed */
- subl $0x1000, %eax
- cmpl $0x1000, %eax
- jge .l_MoreThanAPage
-
-.l_LessThanAPage:
-
-/* raise the top of the stack by EAX bytes (size % 4096) and probe */
- subl %eax, %ecx
- testl %eax, 0(%ecx)
-
-/* EAX = top of the stack */
- movl %esp, %eax
-
-/* allocate the memory */
- movl %ecx, %esp
-
-/* restore ECX */
- movl 0(%eax), %ecx
-
-/* restore the return address */
- movl 4(%eax), %eax
- pushl %eax
-
-/* return */
- ret
-
-/* EOF */

Copied: trunk/reactos/lib/rtl/i386/chkstk.s (from rev 14378, trunk/reactos/lib/ntdll/rtl/i386/chkstk.s)

Modified: trunk/reactos/lib/rtl/makefile
--- trunk/reactos/lib/rtl/makefile	2005-03-29 02:09:42 UTC (rev 14378)
+++ trunk/reactos/lib/rtl/makefile	2005-03-29 14:27:46 UTC (rev 14379)
@@ -46,6 +46,7 @@
 	unicode.o \
 	unicodeprefix.o \
 	version.o \
+	i386/chkstk.o \
 	i386/exception.o \
 	i386/except.o
 

Modified: trunk/reactos/ntoskrnl/ntoskrnl.def
--- trunk/reactos/ntoskrnl/ntoskrnl.def	2005-03-29 02:09:42 UTC (rev 14378)
+++ trunk/reactos/ntoskrnl/ntoskrnl.def	2005-03-29 14:27:46 UTC (rev 14379)
@@ -1400,6 +1400,7 @@
 _abnormal_termination
 _alldiv
 _allmul
+_alloca_probe
 _allrem
 _allshl
 _allshr