#include <sys/cdefs.h>
#include
#include <stdio.h>
using namespace std;
int main(){
int v = 10;
cout << __sync_fetch_and_add(&v,1) << endl;
cout << v << endl;
}
#include <sys/cdefs.h>
#include
#include <stdio.h>
using namespace std;
int main(){
int v = 10;
cout << __sync_fetch_and_add(&v,1) << endl;
cout << v << endl;
}