×

Loading...

On my understanding of this matter, the reason for “safety” in this specific example could not be that there are only one reader and one writer. The reason could be that the statement which access “status”,

e.g. “status=0;” or “status=1;”, is usually, if not always, compiled into a machine code instruction which is “atomic” when the machine's bits >= 8 * sizeof(int).
Sign in and Reply Report