mirror of
https://github.com/reactos/reactos.git
synced 2024-08-07 19:58:21 +00:00
- Fix intrinsics for MSVC -- just include intrin.h instead of duplicating the definitions.
svn path=/trunk/; revision=42550
This commit is contained in:
parent
afceb3314e
commit
98e84293c7
|
@ -13,9 +13,7 @@
|
|||
#include <guiddef.h>
|
||||
#endif /* GUID_DEFINED */
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include "intrin.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -31,27 +31,7 @@ extern "C" {
|
|||
#include <ntdef.h>
|
||||
#include <ntstatus.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include "intrin.h"
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
//
|
||||
// FIXME: MSVC Intrinsics
|
||||
//
|
||||
unsigned char __readfsbyte(const unsigned long Offset);
|
||||
#pragma intrinsic(__readfsbyte)
|
||||
long _InterlockedExchange(volatile long * const Target, const long Value);
|
||||
#pragma intrinsic(_InterlockedExchange)
|
||||
long _InterlockedExchangeAdd(volatile long * const Addend, const long Value);
|
||||
#pragma intrinsic(_InterlockedExchangeAdd)
|
||||
long _InterlockedCompareExchange(volatile long * const Destination, const long Exchange, const long Comperand);
|
||||
#pragma intrinsic(_InterlockedCompareExchange)
|
||||
long _InterlockedDecrement(volatile long * const lpAddend);
|
||||
#pragma intrinsic(_InterlockedDecrement)
|
||||
long _InterlockedIncrement(volatile long * const lpAddend);
|
||||
#pragma intrinsic(_InterlockedIncrement)
|
||||
#endif
|
||||
|
||||
#if !defined(_NTHAL_)
|
||||
#define NTHALAPI DECLSPEC_IMPORT
|
||||
|
|
|
@ -232,9 +232,7 @@ typedef DWORD FLONG;
|
|||
#define C_ASSERT(e) typedef char __C_ASSERT_JOIN(__C_ASSERT__, __LINE__)[(e) ? 1 : -1]
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include "intrin.h"
|
||||
#endif
|
||||
|
||||
#define NTAPI __stdcall
|
||||
#include <basetsd.h>
|
||||
|
@ -4893,9 +4891,6 @@ extern struct _TEB * NtCurrentTeb(void);
|
|||
|
||||
#if (_MSC_FULL_VER >= 13012035)
|
||||
|
||||
unsigned long __readfsdword(const unsigned long Offset);
|
||||
#pragma intrinsic(__readfsdword)
|
||||
|
||||
__inline PVOID GetCurrentFiber(void) { return (PVOID)(ULONG_PTR)__readfsdword(0x10); }
|
||||
__inline struct _TEB * NtCurrentTeb(void) { return (struct _TEB *)(ULONG_PTR)__readfsdword(0x18); }
|
||||
|
||||
|
|
Loading…
Reference in a new issue