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”,

old (HH)
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).
2001-6-23 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: Computer Jobs need true skills----see these assignments, please

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论