r199923 - Intrin.h: fix definitions of _Interlocked{In,De}crement16
Hans Wennborg
hans at hanshq.net
Thu Jan 23 11:15:39 PST 2014
Author: hans
Date: Thu Jan 23 13:15:39 2014
New Revision: 199923
URL: http://llvm.org/viewvc/llvm-project?rev=199923&view=rev
Log:
Intrin.h: fix definitions of _Interlocked{In,De}crement16
The declarations seem correct, but the definitions were using
chars instead of shorts.
Modified:
cfe/trunk/lib/Headers/Intrin.h
Modified: cfe/trunk/lib/Headers/Intrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/Intrin.h?rev=199923&r1=199922&r2=199923&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/Intrin.h (original)
+++ cfe/trunk/lib/Headers/Intrin.h Thu Jan 23 13:15:39 2014
@@ -600,8 +600,8 @@ _InterlockedExchangeSub64(__int64 volati
/*----------------------------------------------------------------------------*\
|* Interlocked Increment
\*----------------------------------------------------------------------------*/
-static __inline__ char __attribute__((__always_inline__, __nodebug__))
-_InterlockedIncrement16(char volatile *_Value) {
+static __inline__ short __attribute__((__always_inline__, __nodebug__))
+_InterlockedIncrement16(short volatile *_Value) {
return __atomic_add_fetch(_Value, 1, 0);
}
static __inline__ long __attribute__((__always_inline__, __nodebug__))
@@ -617,8 +617,8 @@ _InterlockedIncrement64(__int64 volatile
/*----------------------------------------------------------------------------*\
|* Interlocked Decrement
\*----------------------------------------------------------------------------*/
-static __inline__ char __attribute__((__always_inline__, __nodebug__))
-_InterlockedDecrement16(char volatile *_Value) {
+static __inline__ short __attribute__((__always_inline__, __nodebug__))
+_InterlockedDecrement16(short volatile *_Value) {
return __atomic_sub_fetch(_Value, 1, 0);
}
static __inline__ long __attribute__((__always_inline__, __nodebug__))
More information about the cfe-commits
mailing list