Skip to content
Snippets Groups Projects
Commit b76b51e8 authored by Hans Wennborg's avatar Hans Wennborg
Browse files

Intrin.h: fix definitions of _Interlocked{In,De}crement16

The declarations seem correct, but the definitions were using
chars instead of shorts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199923 91177308-0d34-0410-b5e6-96231b3b80d8
parent 85b85099
No related branches found
No related tags found
No related merge requests found
...@@ -600,8 +600,8 @@ _InterlockedExchangeSub64(__int64 volatile *_Subend, __int64 _Value) { ...@@ -600,8 +600,8 @@ _InterlockedExchangeSub64(__int64 volatile *_Subend, __int64 _Value) {
/*----------------------------------------------------------------------------*\ /*----------------------------------------------------------------------------*\
|* Interlocked Increment |* Interlocked Increment
\*----------------------------------------------------------------------------*/ \*----------------------------------------------------------------------------*/
static __inline__ char __attribute__((__always_inline__, __nodebug__)) static __inline__ short __attribute__((__always_inline__, __nodebug__))
_InterlockedIncrement16(char volatile *_Value) { _InterlockedIncrement16(short volatile *_Value) {
return __atomic_add_fetch(_Value, 1, 0); return __atomic_add_fetch(_Value, 1, 0);
} }
static __inline__ long __attribute__((__always_inline__, __nodebug__)) static __inline__ long __attribute__((__always_inline__, __nodebug__))
...@@ -617,8 +617,8 @@ _InterlockedIncrement64(__int64 volatile *_Value) { ...@@ -617,8 +617,8 @@ _InterlockedIncrement64(__int64 volatile *_Value) {
/*----------------------------------------------------------------------------*\ /*----------------------------------------------------------------------------*\
|* Interlocked Decrement |* Interlocked Decrement
\*----------------------------------------------------------------------------*/ \*----------------------------------------------------------------------------*/
static __inline__ char __attribute__((__always_inline__, __nodebug__)) static __inline__ short __attribute__((__always_inline__, __nodebug__))
_InterlockedDecrement16(char volatile *_Value) { _InterlockedDecrement16(short volatile *_Value) {
return __atomic_sub_fetch(_Value, 1, 0); return __atomic_sub_fetch(_Value, 1, 0);
} }
static __inline__ long __attribute__((__always_inline__, __nodebug__)) static __inline__ long __attribute__((__always_inline__, __nodebug__))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment