Author: akhaldi
Date: Fri May 14 13:45:14 2010
New Revision: 47196
URL:
http://svn.reactos.org/svn/reactos?rev=47196&view=rev
Log:
[INTRIN_ARM]
- Implement __yield and __break arm intrinsics.
[DDK]
- Relax INTERLOCKED_RESULT conditional definition.
[PSDK]
- Fix some nasty structure misalignments.
- Fix YieldProcessor definition for ARM.
[ARMDDK]
- Add several missing definitions.
Modified:
branches/header-work/include/crt/mingw32/intrin_arm.h
branches/header-work/include/ddk/ntddk.h
branches/header-work/include/psdk/winnt.h
branches/header-work/include/reactos/arm/armddk.h
Modified: branches/header-work/include/crt/mingw32/intrin_arm.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/crt/mingw32…
==============================================================================
--- branches/header-work/include/crt/mingw32/intrin_arm.h [iso-8859-1] (original)
+++ branches/header-work/include/crt/mingw32/intrin_arm.h [iso-8859-1] Fri May 14 13:45:14
2010
@@ -34,6 +34,10 @@
#define _ReturnAddress() (__builtin_return_address(0))
#define _ReadWriteBarrier() __sync_synchronize()
+
+__INTRIN_INLINE void __yield(void) { __asm__ __volatile__("yield"); }
+
+__INTRIN_INLINE void __break(unsigned int value) { __asm__ __volatile__("bkpt
%0": : "M" (value)); }
__INTRIN_INLINE unsigned short _byteswap_ushort(unsigned short value)
{
Modified: branches/header-work/include/ddk/ntddk.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntddk.h…
==============================================================================
--- branches/header-work/include/ddk/ntddk.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/ntddk.h [iso-8859-1] Fri May 14 13:45:14 2010
@@ -3289,13 +3289,11 @@
#define RESULT_POSITIVE 2
#endif
-#if defined(_X86_) || defined(_IA64_) || defined(_M_AMD64) &&
!defined(RC_INVOKED) && !defined(MIDL_PASS)
typedef enum _INTERLOCKED_RESULT {
ResultNegative = RESULT_NEGATIVE,
ResultZero = RESULT_ZERO,
ResultPositive = RESULT_POSITIVE
} INTERLOCKED_RESULT;
-#endif
#ifdef _X86_
Modified: branches/header-work/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/winnt.…
==============================================================================
--- branches/header-work/include/psdk/winnt.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/winnt.h [iso-8859-1] Fri May 14 13:45:14 2010
@@ -3760,6 +3760,7 @@
} IMAGE_SECTION_HEADER,*PIMAGE_SECTION_HEADER;
#include <pshpack2.h>
+
typedef struct _IMAGE_SYMBOL {
union {
BYTE ShortName[8];
@@ -3818,6 +3819,17 @@
} Section;
} IMAGE_AUX_SYMBOL,*PIMAGE_AUX_SYMBOL;
+typedef struct _IMAGE_RELOCATION {
+ _ANONYMOUS_UNION union {
+ DWORD VirtualAddress;
+ DWORD RelocCount;
+ } DUMMYUNIONNAME;
+ DWORD SymbolTableIndex;
+ WORD Type;
+} IMAGE_RELOCATION,*PIMAGE_RELOCATION;
+
+#include <poppack.h>
+
#ifndef __IMAGE_COR20_HEADER_DEFINED__
#define __IMAGE_COR20_HEADER_DEFINED__
@@ -3884,16 +3896,6 @@
DWORD RvaToFirstByteOfData;
DWORD RvaToLastByteOfData;
} IMAGE_COFF_SYMBOLS_HEADER,*PIMAGE_COFF_SYMBOLS_HEADER;
-
-typedef struct _IMAGE_RELOCATION {
- _ANONYMOUS_UNION union {
- DWORD VirtualAddress;
- DWORD RelocCount;
- } DUMMYUNIONNAME;
- DWORD SymbolTableIndex;
- WORD Type;
-} IMAGE_RELOCATION,*PIMAGE_RELOCATION;
-#include <poppack.h>
typedef struct _IMAGE_BASE_RELOCATION {
DWORD VirtualAddress;
@@ -5081,7 +5083,7 @@
#elif defined(_M_MIPS)
#define YieldProcessor() __asm__ __volatile__("nop");
#elif defined(_M_ARM)
-#define YieldProcessor()
+#define YieldProcessor __yield
#else
#error Unknown architecture
#endif
Modified: branches/header-work/include/reactos/arm/armddk.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/reactos/arm…
==============================================================================
--- branches/header-work/include/reactos/arm/armddk.h [iso-8859-1] (original)
+++ branches/header-work/include/reactos/arm/armddk.h [iso-8859-1] Fri May 14 13:45:14
2010
@@ -189,6 +189,36 @@
NTAPI
KeGetCurrentThread(VOID);
+extern volatile struct _KSYSTEM_TIME KeTickCount;
+
+#ifndef YieldProcessor
+#define YieldProcessor __yield
+#endif
+
+#define ASSERT_BREAKPOINT BREAKPOINT_COMMAND_STRING + 1
+
+#define DbgRaiseAssertionFailure() __break(ASSERT_BREAKPOINT)
+
+#define PCR_MINOR_VERSION 1
+#define PCR_MAJOR_VERSION 1
+
+#define RESULT_ZERO 0
+#define RESULT_NEGATIVE 1
+#define RESULT_POSITIVE 2
+
+DECLSPEC_IMPORT
+VOID
+__fastcall
+KfReleaseSpinLock(
+ IN OUT ULONG_PTR* SpinLock,
+ IN KIRQL NewIrql);
+
+DECLSPEC_IMPORT
+KIRQL
+__fastcall
+KfAcquireSpinLock(
+ IN OUT ULONG_PTR* SpinLock);
+
#ifndef _WINNT_H
//
// IRQL Support on ARM is similar to MIPS/ALPHA