On 2023-03-02, Chris Angelico <ros...@gmail.com> wrote: > On Thu, 2 Mar 2023 at 08:01, <2qdxy4rzwzuui...@potatochowder.com> wrote: >> On 2023-03-01 at 14:35:35 -0500, >> avi.e.gr...@gmail.com wrote: >> > What would have happened if all processors had been required to have >> > some low level instruction that effectively did something in an atomic >> > way that allowed a way for anyone using any language running on that >> > machine a way to do a simple thing like set a lock or check it? >> >> Have happened? I don't know about "required," but processors have >> indeed had such instructions for decades; e.g., the MC68000 from the >> early to mid 1980s (and used in the original Apple Macintosh, but I >> digress) has/had a Test and Set instruction. > > As have all CPUs since; it's the only way to implement locks (push the > locking all the way down to the CPU level).
Indeed, I remember thinking it was very fancy when they added the SWP instruction to the ARM processor. -- https://mail.python.org/mailman/listinfo/python-list