- Add -fms-extensions for arm build

- 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
This commit is contained in:
Timo Kreuzer 2010-04-06 00:00:00 +00:00
parent c96838e350
commit 84f23f68d1
5 changed files with 34 additions and 6 deletions

View file

@ -28,6 +28,7 @@
<if property="OPTIMIZE" value="1"> <if property="OPTIMIZE" value="1">
<compilerflag>-ftracer</compilerflag> <compilerflag>-ftracer</compilerflag>
</if> </if>
<compilerflag>-fms-extensions</compilerflag>
<compilerflag>-Wno-attributes</compilerflag> <compilerflag>-Wno-attributes</compilerflag>
<compilerflag>-U_UNICODE</compilerflag> <compilerflag>-U_UNICODE</compilerflag>
<compilerflag>-UUNICODE</compilerflag> <compilerflag>-UUNICODE</compilerflag>

View file

@ -3303,13 +3303,14 @@ ExFreeToZone(
#define ExIsResourceAcquired ExIsResourceAcquiredSharedLite #define ExIsResourceAcquired ExIsResourceAcquiredSharedLite
#define ExReleaseResourceForThread ExReleaseResourceForThreadLite #define ExReleaseResourceForThread ExReleaseResourceForThreadLite
#ifdef _X86_
typedef enum _INTERLOCKED_RESULT { typedef enum _INTERLOCKED_RESULT {
ResultNegative = RESULT_NEGATIVE, ResultNegative = RESULT_NEGATIVE,
ResultZero = RESULT_ZERO, ResultZero = RESULT_ZERO,
ResultPositive = RESULT_POSITIVE ResultPositive = RESULT_POSITIVE
} INTERLOCKED_RESULT; } INTERLOCKED_RESULT;
#ifdef _X86_
NTKERNELAPI NTKERNELAPI
INTERLOCKED_RESULT INTERLOCKED_RESULT
FASTCALL FASTCALL

View file

@ -565,6 +565,9 @@ typedef struct _PROCESSOR_NUMBER {
UCHAR Reserved; UCHAR Reserved;
} PROCESSOR_NUMBER, *PPROCESSOR_NUMBER; } PROCESSOR_NUMBER, *PPROCESSOR_NUMBER;
struct _CONTEXT;
struct _EXCEPTION_RECORD;
typedef EXCEPTION_DISPOSITION typedef EXCEPTION_DISPOSITION
(NTAPI *PEXCEPTION_ROUTINE)( (NTAPI *PEXCEPTION_ROUTINE)(
IN struct _EXCEPTION_RECORD *ExceptionRecord, IN struct _EXCEPTION_RECORD *ExceptionRecord,

View file

@ -54,13 +54,16 @@ extern ULONG_PTR MmUserProbeAddress;
// //
#define MAXIMUM_VECTOR 16 #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 // Used to contain PFNs and PFN counts
// //
typedef ULONG PFN_COUNT; //typedef ULONG PFN_COUNT;
typedef ULONG PFN_NUMBER, *PPFN_NUMBER; //typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
typedef LONG SPFN_NUMBER, *PSPFN_NUMBER; //typedef LONG SPFN_NUMBER, *PSPFN_NUMBER;
// //
// Stub // Stub
@ -124,11 +127,25 @@ typedef struct _CONTEXT {
#ifdef _WINNT_H #ifdef _WINNT_H
#define KIRQL ULONG #define KIRQL ULONG
#endif #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 typedef struct _KPCR
{ {
union union
{ {
NT_TIB NtTib; NT_TIB_KPCR NtTib;
struct struct
{ {
struct _EXCEPTION_REGISTRATION_RECORD *Used_ExceptionList; // Unused struct _EXCEPTION_REGISTRATION_RECORD *Used_ExceptionList; // Unused
@ -167,6 +184,11 @@ struct _TEB* NtCurrentTeb(VOID)
return (struct _TEB*)USERPCR->Used_Self; return (struct _TEB*)USERPCR->Used_Self;
} }
NTSYSAPI
PKTHREAD
NTAPI
KeGetCurrentThread(VOID);
#ifndef _WINNT_H #ifndef _WINNT_H
// //
// IRQL Support on ARM is similar to MIPS/ALPHA // IRQL Support on ARM is similar to MIPS/ALPHA

View file

@ -67,13 +67,14 @@ ExFreeToZone(
#define ExIsResourceAcquired ExIsResourceAcquiredSharedLite #define ExIsResourceAcquired ExIsResourceAcquiredSharedLite
#define ExReleaseResourceForThread ExReleaseResourceForThreadLite #define ExReleaseResourceForThread ExReleaseResourceForThreadLite
#ifdef _X86_
typedef enum _INTERLOCKED_RESULT { typedef enum _INTERLOCKED_RESULT {
ResultNegative = RESULT_NEGATIVE, ResultNegative = RESULT_NEGATIVE,
ResultZero = RESULT_ZERO, ResultZero = RESULT_ZERO,
ResultPositive = RESULT_POSITIVE ResultPositive = RESULT_POSITIVE
} INTERLOCKED_RESULT; } INTERLOCKED_RESULT;
#ifdef _X86_
NTKERNELAPI NTKERNELAPI
INTERLOCKED_RESULT INTERLOCKED_RESULT
FASTCALL FASTCALL