Sign in
ara-mdk
/
platform
/
system
/
extras
/
aef25b7d9c43b0e546312c819066b0684711ef7f
/
.
/
tests
/
bionic
/
libc
/
other
/
test_atomics.c
blob: 0de2a938ab5821c0b5e5b1a1bf488be4a511800a [
file
] [
log
] [
blame
]
#include
<stdio.h>
extern
int
__atomic_dec
(
volatile
int
*
addr
);
int
main
(
int
argc
,
const
char
*
argv
[])
{
int
x
=
5
;
while
(
x
>
-
20
)
{
printf
(
"old_x=%d\n"
,
__atomic_dec
(&
x
));
printf
(
"x=%d\n"
,
x
);
}
printf
(
"OK\n"
);
return
0
;
}