Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2882.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2882 Author: eem Time: 13 November 2020, 2:11:40.169267 pm UUID: 56de32d6-c90d-4050-a303-72f507d82266 Ancestors: VMMaker.oscog-eem.2881 Fix the longjmp's back to the interpreter and the thread scheduling loop so they make sense. Add a useful assert to tryLockVMOwnerTo: that catches a broken implementation (as was the initial version of ARMv8 above LDAXR/STLXR). =============== Diff against VMMaker.oscog-eem.2881 =============== Item was changed: ----- Method: CoInterpreterMT>>threadSchedulingLoop: (in category 'vm scheduling') ----- threadSchedulingLoop: vmThread "Enter a loop attempting to run the VM with the highest priority process and blocking on the thread's OS semaphore when unable to run that process. This version is for simulation only, simulating the longjmp back to the real threadSchedulingLoopImplementation: through exception handling." <cmacro: '(vmThread) threadSchedulingLoopImplementation(vmThread)'> self initializeProcessorForThreadIndex: vmThread index. + [[self threadSchedulingLoopImplementation: vmThread] - [([self threadSchedulingLoopImplementation: vmThread] on: ReenterThreadSchedulingLoop + do: [:ex| self assert: ex returnValue = 1. ex return: true]] whileTrue! - do: [:ex| ex return: ex returnValue]) = ReenterThreadSchedulingLoop] whileTrue! Item was changed: ----- Method: Cogit>>tryLockVMOwnerTo: (in category 'multi-threading') ----- tryLockVMOwnerTo: value <api> "ceTryLockVMOwner does an atomic compare-and-swap of the vmOwner variable with zero and the argument, setting vmOwner to value if it was zero. It answers if the lock was zero and hence was acquired." <cmacro: '(value) ceTryLockVMOwner(value)'> processor abiMarshalArg0: value in: objectMemory memory. + ^[ | result | + result := self simulateLeafCallOf: ceTryLockVMOwner. + self assert: (result ~= 0) = (coInterpreter threadManager getVMOwner = value). + result ~= 0] ensure: + [processor abiUnmarshal: 1]! - ^[(self simulateLeafCallOf: ceTryLockVMOwner) ~= 0] ensure: - [processor abiUnmarshal: 1]! Item was changed: ----- Method: StackInterpreter>>enterSmalltalkExecutive (in category 'initialization') ----- enterSmalltalkExecutive "Main entry-point into the interpreter at each execution level, where an execution level is either the start of execution or reentry for a callback." <cmacro: '() enterSmalltalkExecutiveImplementation()'> "Simulation of the setjmp in enterSmalltalkExecutiveImplementation for reentry into interpreter." + [[self enterSmalltalkExecutiveImplementation] - [([self enterSmalltalkExecutiveImplementation] on: ReenterInterpreter + do: [:ex| self assert: ex returnValue = ReturnToInterpreter. ex return: true]] whileTrue! - do: [:ex| ex return: ex returnValue]) = ReturnToInterpreter] whileTrue! |
Free forum by Nabble | Edit this page |