1 #include <stdio.h> 2 3 4 extern int __atomic_dec(volatile int* addr); 5 6 int main(int argc, const char *argv[]) 7 { 8 int x = 5; 9 10 while (x > -20) { 11 printf("old_x=%d\n", __atomic_dec(&x)); 12 printf("x=%d\n", x); 13 } 14 15 printf ("OK\n"); 16 return 0; 17 } 18