- Add -fms-extensions for arm build
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 6 Apr 2010 00:00:00 +0000 (00:00 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 6 Apr 2010 00:00:00 +0000 (00:00 +0000)
- Add _NT_TIB_KPCR to compensate for a missing NT_TIB (hackfix)
- add KERNEL_STACK_SIZE & co for arm
- Add missing KeGetCurrentThread prototype for arm
- define INTERLOCKED_RESULT for X86 only
- Add _CONTEXT and _EXCEPTION_RECORD forward declarations

svn path=/trunk/; revision=46741

reactos/ReactOS-arm.rbuild
reactos/include/ddk/ntddk.h
reactos/include/psdk/ntdef.h
reactos/include/reactos/arm/armddk.h
reactos/include/xdk/exfuncs.h

index 777a1aa..6d7abe7 100644 (file)
@@ -28,6 +28,7 @@
                <if property="OPTIMIZE" value="1">
                        <compilerflag>-ftracer</compilerflag>
                </if>
+               <compilerflag>-fms-extensions</compilerflag>
         <compilerflag>-Wno-attributes</compilerflag>
         <compilerflag>-U_UNICODE</compilerflag>
         <compilerflag>-UUNICODE</compilerflag>
index 88aa183..fdd99d9 100644 (file)
@@ -3303,13 +3303,14 @@ ExFreeToZone(
 #define ExIsResourceAcquired ExIsResourceAcquiredSharedLite
 #define ExReleaseResourceForThread ExReleaseResourceForThreadLite
 
+#ifdef _X86_
+
 typedef enum _INTERLOCKED_RESULT {
   ResultNegative = RESULT_NEGATIVE,
   ResultZero = RESULT_ZERO,
   ResultPositive = RESULT_POSITIVE
 } INTERLOCKED_RESULT;
 
-#ifdef _X86_
 NTKERNELAPI
 INTERLOCKED_RESULT
 FASTCALL
index fdc3650..18107cd 100644 (file)
@@ -565,6 +565,9 @@ typedef struct _PROCESSOR_NUMBER {
   UCHAR Reserved;
 } PROCESSOR_NUMBER, *PPROCESSOR_NUMBER;
 
+struct _CONTEXT;
+struct _EXCEPTION_RECORD;
+
 typedef EXCEPTION_DISPOSITION
 (NTAPI *PEXCEPTION_ROUTINE)(
   IN struct _EXCEPTION_RECORD *ExceptionRecord,
index 68262c2..82e6d9f 100644 (file)
@@ -54,13 +54,16 @@ extern ULONG_PTR MmUserProbeAddress;
 //
 #define MAXIMUM_VECTOR          16
 
+#define KERNEL_STACK_SIZE                   12288
+#define KERNEL_LARGE_STACK_SIZE             61440
+#define KERNEL_LARGE_STACK_COMMIT           12288
 
 //
 // Used to contain PFNs and PFN counts
 //
-typedef ULONG PFN_COUNT;
-typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
-typedef LONG SPFN_NUMBER, *PSPFN_NUMBER;
+//typedef ULONG PFN_COUNT;
+//typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
+//typedef LONG SPFN_NUMBER, *PSPFN_NUMBER;
 
 //
 // Stub
@@ -124,11 +127,25 @@ typedef struct _CONTEXT {
 #ifdef _WINNT_H
 #define KIRQL ULONG
 #endif
+
+typedef struct _NT_TIB_KPCR {
+       struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
+       PVOID StackBase;
+       PVOID StackLimit;
+       PVOID SubSystemTib;
+       _ANONYMOUS_UNION union {
+               PVOID FiberData;
+               ULONG Version;
+       } DUMMYUNIONNAME;
+       PVOID ArbitraryUserPointer;
+       struct _NT_TIB_KPCR *Self;
+} NT_TIB_KPCR,*PNT_TIB_KPCR;
+
 typedef struct _KPCR
 {
     union
     {
-        NT_TIB NtTib;
+        NT_TIB_KPCR NtTib;
         struct
         {
             struct _EXCEPTION_REGISTRATION_RECORD *Used_ExceptionList; // Unused
@@ -167,6 +184,11 @@ struct _TEB* NtCurrentTeb(VOID)
     return (struct _TEB*)USERPCR->Used_Self;
 }
 
+NTSYSAPI
+PKTHREAD
+NTAPI
+KeGetCurrentThread(VOID);
+
 #ifndef _WINNT_H
 //
 // IRQL Support on ARM is similar to MIPS/ALPHA
index 46a5387..2879e1d 100644 (file)
@@ -67,13 +67,14 @@ ExFreeToZone(
 #define ExIsResourceAcquired ExIsResourceAcquiredSharedLite
 #define ExReleaseResourceForThread ExReleaseResourceForThreadLite
 
+#ifdef _X86_
+
 typedef enum _INTERLOCKED_RESULT {
   ResultNegative = RESULT_NEGATIVE,
   ResultZero = RESULT_ZERO,
   ResultPositive = RESULT_POSITIVE
 } INTERLOCKED_RESULT;
 
-#ifdef _X86_
 NTKERNELAPI
 INTERLOCKED_RESULT
 FASTCALL