Sign in
mingw
/
mingw-w64
/
89efd09c1c48e6156ee467137880e11528b8a581
/
.
/
mingw-w64-crt
/
intrincs
/
ilockdec.c
blob: b285666a3e940257c408e0d1b35d10bdb0cb810f [
file
] [
log
] [
blame
]
#include
<intrin.h>
long
_InterlockedDecrement
(
long
volatile
*
Addend
)
{
long
ret
=
-
1
;
__asm__ __volatile__
(
"lock\n\t"
"xaddl %0,%1"
:
"+r"
(
ret
),
"+m"
(*
Addend
)
:
:
"memory"
);
return
ret
-
1
;
}