int y = 0; // global
void ThreadFunc(int &y){ // local reference var that shadows the global
y += 2;
}
If this is being run from 5 threads, can y = 8? If so, what would this look like in assembly language that would lead y = 8?
int y = 0; // global
void ThreadFunc(int &y){ // local reference var that shadows the global
y += 2;
}
If this is being run from 5 threads, can y = 8? If so, what would this look like in assembly language that would lead y = 8?