Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: c1cd0354069516bfdecd939710f81c8ecdd49f7e https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/c1cd0354069516bfdec... Author: Eliot Miranda eliot.miranda@gmail.com Date: 2024-02-13 (Tue, 13 Feb 2024)
Changed paths: M platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.m M scripts/revertIfEssentiallyUnchanged M src/plugins/FilePlugin/FilePlugin.c M src/plugins/Squeak3D/Squeak3D.c M src/plugins/SqueakSSL/SqueakSSL.c M src/spur32.cog.lowcode/cointerp.c M src/spur32.cog.lowcode/gcc3x-cointerp.c M src/spur32.cog.newspeak/cointerp.c M src/spur32.cog.newspeak/gcc3x-cointerp.c M src/spur32.cog/cointerp.c M src/spur32.cog/cointerpmt.c M src/spur32.cog/gcc3x-cointerp.c M src/spur32.cog/gcc3x-cointerpmt.c M src/spur32.sista/cointerp.c M src/spur32.sista/gcc3x-cointerp.c M src/spur64.cog.lowcode/cointerp.c M src/spur64.cog.lowcode/gcc3x-cointerp.c M src/spur64.cog.newspeak/cointerp.c M src/spur64.cog.newspeak/gcc3x-cointerp.c M src/spur64.cog/cogitARMv8.c M src/spur64.cog/cointerp.c M src/spur64.cog/cointerpmt.c M src/spur64.cog/gcc3x-cointerp.c M src/spur64.cog/gcc3x-cointerpmt.c M src/spur64.sista/cogitARMv8.c M src/spur64.sista/cointerp.c M src/spur64.sista/gcc3x-cointerp.c M src/spur64.stack.newspeak/gcc3x-interp.c M src/spur64.stack.newspeak/interp.c M src/v3.cog/cointerp.c M src/v3.cog/gcc3x-cointerp.c
Log Message: ----------- CogVM source as per VMMaker.oscog-eem.3349
Integrate VMMaker.threaded-LM.3339, 3341, 3342 & 3343.
Make vmThread>>#state an atomic_int
Allow -1 to be set as vmOwner. This is currently used by the heartbeat thread. In future this will be used by the ownVMFromUnidentifiedThread function.
This combines well with the additional change that makes disownVM return a CogVMThread* disguised as void*.
We can then ensure that the threads variable is only ever accessed by the vm owner.
Fix multiple issues regarding thread safety
1. vmOwner -1 can be used to lock the VM to a thread that is not a classical "VM Thread" (e.g. the heartbeat thread). 2. maxWaitingPriority is now an atomic.
Fix thread switch accidentally disowning the VM which causes an incorrect preemption.
Allow thread switching during the SqueakSSL primitiveConnect.
Rename ownerIndex to threadAffinity.
And update revertIfEssentiallyUnchanged to cope with the CryptographyPlugins.