~mingw-w64/mingw-w64/experimental

« back to all changes in this revision

Viewing changes to ros-privexp/mingw-w64-crt/intrincs/ilockdec16.c

  • Committer: NightStrike
  • Date: 2010-08-11 22:20:57 UTC
  • Revision ID: svn-v4:4407c894-4637-0410-b4f5-ada5f102cad1:experimental:3266
Branch for adding option for supporting ros

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <intrin.h>
 
2
 
 
3
short _InterlockedDecrement16(short volatile *Addend)
 
4
{
 
5
  short ret = -1;
 
6
  __asm__ __volatile__ ("lock\n\t"
 
7
               "xaddw %0,%1"
 
8
               : "+r" (ret), "+m" (*Addend)
 
9
               : : "memory");
 
10
  return ret - 1;
 
11
}
 
12
 
 
13
short InterlockedDecrement16(short volatile *) __attribute__((alias("_InterlockedDecrement16")));
 
14