Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3365.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3365
Author: eem
Time: 17 April 2024, 4:17:09.846667 pm
UUID: d067e715-4de3-4931-8c6e-5884b5fbab91
Ancestors: VMMaker.oscog-eem.3364
First pass at getting threaded VM to work on Mac. Only call ioProcessEvents if teh platform doesn't care (doesn't define ioEventThreadAffinity, or defines it as 0) or the current thread id is the same as ioEventThreadAffinity.
Nuke vmOwnerAddress & vmOwnerFromMachineCode which were used only by the pre-C-atomics access code to generate the machine code accessors for vmOwner.
=============== Diff against VMMaker.oscog-eem.3364 ===============
Item was changed:
----- Method: CoInterpreterMT>>checkForEventsMayContextSwitch: (in category 'process primitive support') -----
checkForEventsMayContextSwitch: mayContextSwitch
"Check for possible interrupts and handle one if necessary.
Answer if a context switch has occurred."
+ | switched sema now threadingThwartsIOProcessEventsInvocation |
- | switched sema now |
<inline: false>
<var: #now type: #usqLong>
self assertSaneThreadAndProcess.
cogit assertCStackWellAligned.
statCheckForEvents := statCheckForEvents + 1.
"restore the stackLimit if it has been smashed."
self restoreStackLimit.
self externalWriteBackHeadFramePointers.
self assert: stackPage = stackPages mostRecentlyUsedPage.
"Allow the platform to do anything it needs to do synchronously."
self ioSynchronousCheckForEvents.
self checkCogCompiledCodeCompactionCalledFor.
objectMemory needGCFlag ifTrue:
["sufficientSpaceAfterGC: runs the incremental GC and
then, if not enough space is available, the fullGC."
(objectMemory sufficientSpaceAfterGC: 0) ifFalse:
[self setSignalLowSpaceFlagAndSaveProcess]].
mayContextSwitch ifFalse: [^false].
switched := false.
self assert: deferThreadSwitch not.
deferThreadSwitch := true.
(profileProcess ~= objectMemory nilObject
or: [nextProfileTick > 0 and:[self ioHighResClock >= nextProfileTick]]) ifTrue:
[self zeroNextProfileTick.
"Take a sample (if not already done so) for the profiler if it is active. This
must be done before any of the synchronousSignals below or else we will
attribute a pause in ioRelinquishProcessor to the newly activated process."
profileProcess = objectMemory nilObject ifTrue:
[profileProcess := self activeProcess.
profileMethod := objectMemory nilObject].
"and signal the profiler semaphore if it is present"
(profileSemaphore ~= objectMemory nilObject
and: [self synchronousSignal: profileSemaphore]) ifTrue:
[switched := true]].
self cppIf: #LRPCheck
ifTrue:
[self checkDeliveryOfLongRunningPrimitiveSignal ifTrue:
[switched := true]].
objectMemory signalLowSpace ifTrue:
[objectMemory signalLowSpace: false. "reset flag"
sema := objectMemory splObj: TheLowSpaceSemaphore.
(sema ~= objectMemory nilObject
and: [self synchronousSignal: sema]) ifTrue:
[switched := true]].
+ threadingThwartsIOProcessEventsInvocation := self checkInvokeIOProcessEvents: (now := self ioUTCMicroseconds).
- "inIOProcessEvents prevents reentrancy into ioProcessEvents and allows disabling
- ioProcessEvents e.g. for native GUIs. We would like to manage that here but can't
- since the platform code may choose to call ioProcessEvents itself in various places."
- false
- ifTrue:
- [((now := self ioUTCMicroseconds) >= nextPollUsecs
- and: [inIOProcessEvents = 0]) ifTrue:
- [statIOProcessEvents := statIOProcessEvents + 1.
- inIOProcessEvents := inIOProcessEvents + 1.
- self ioProcessEvents. "sets interruptPending if interrupt key pressed; may callback"
- inIOProcessEvents > 0 ifTrue:
- [inIOProcessEvents := inIOProcessEvents - 1].
- nextPollUsecs := now + 20000
- "msecs to wait before next call to ioProcessEvents. Note that strictly
- speaking we might need to update 'now' at this point since
- ioProcessEvents could take a very long time on some platforms"]]
- ifFalse:
- [(now := self ioUTCMicroseconds) >= nextPollUsecs ifTrue:
- [statIOProcessEvents := statIOProcessEvents + 1.
- self ioProcessEvents. "sets interruptPending if interrupt key pressed; may callback"
- nextPollUsecs := now + 20000
- "msecs to wait before next call to ioProcessEvents. Note that strictly
- speaking we might need to update 'now' at this point since
- ioProcessEvents could take a very long time on some platforms"]].
interruptPending ifTrue:
[interruptPending := false.
"reset interrupt flag"
sema := objectMemory splObj: TheInterruptSemaphore.
(sema ~= objectMemory nilObject
and: [self synchronousSignal: sema]) ifTrue:
[switched := true]].
nextWakeupUsecs ~= 0 ifTrue:
[now >= nextWakeupUsecs ifTrue:
[nextWakeupUsecs := 0.
"set timer interrupt to 0 for 'no timer'"
sema := objectMemory splObj: TheTimerSemaphore.
(sema ~= objectMemory nilObject
and: [self synchronousSignal: sema]) ifTrue:
[switched := true]]].
"signal any pending finalizations"
pendingFinalizationSignals > 0 ifTrue:
[pendingFinalizationSignals := 0.
sema := objectMemory splObj: TheFinalizationSemaphore.
(sema ~= objectMemory nilObject
and: [self synchronousSignal: sema]) ifTrue:
[switched := true]].
"signal all semaphores in semaphoresToSignal"
self signalExternalSemaphores ifTrue:
[switched := true].
deferThreadSwitch := false.
+ (threadingThwartsIOProcessEventsInvocation
+ or: [checkThreadActivation]) ifTrue:
- checkThreadActivation ifTrue:
[checkThreadActivation := false.
self cedeToHigherPriorityThreads]. "N.B. This may not return if we do switch."
self threadSwitchIfNecessary: self activeProcess from: CSCheckEvents.
^switched!
Item was added:
+ ----- Method: CoInterpreterMT>>checkInvokeIOProcessEvents: (in category 'process primitive support') -----
+ checkInvokeIOProcessEvents: now
+ "Some platforms allow event resaponse only from a subset of threads (e.g. on Mac, the main application thread).
+ Override to check if the platform allows us to invoke or not and answer true if ioProcessEvents should have been
+ invoked but wasn't because of thread affinity."
+ <inline: #always>
+ (self ioEventThreadAffinity > 0
+ and: [self ioEventThreadAffinity ~= cogThreadManager getVMOwner]) ifTrue:
+ [^now >= nextPollUsecs].
+ super checkInvokeIOProcessEvents: now.
+ ^false!
Item was removed:
- ----- Method: CoInterpreterMT>>vmOwnerAddress (in category 'simulation') -----
- vmOwnerAddress
- <doNotGenerate>
- ^cogThreadManager vmOwnerAddress!
Item was removed:
- ----- Method: CogThreadManager>>vmOwnerAddress (in category 'Cogit lock implementation') -----
- vmOwnerAddress
- <api> "NB. For the JIT only, so it can generate the lock & unlock functions."
- <returnTypeC: #usqInt>
- self error: 'Deprecated!! Replaced by proper atomic functions'.
- ^self
- cCode: [(self addressOf: vmOwner) asUnsignedInteger]
- inSmalltalk: [cogit simulatedReadWriteVariableAddress: #vmOwnerFromMachineCode in: self]!
Item was removed:
- ----- Method: CogThreadManager>>vmOwnerFromMachineCode (in category 'Cogit lock implementation') -----
- vmOwnerFromMachineCode
- <doNotGenerate>
- self error: 'Deprecated!! Replaced by proper atomic C functions'.
- ^vmOwner!
Item was removed:
- ----- Method: CogThreadManager>>vmOwnerFromMachineCode: (in category 'Cogit lock implementation') -----
- vmOwnerFromMachineCode: aValue
- <doNotGenerate>
- self error: 'Deprecated!! Replaced by proper atomic C functions'.
- self assert: (aValue between: 0 and: numThreads).
- vmOwner := aValue!
Item was changed:
----- Method: StackInterpreter>>checkForEventsMayContextSwitch: (in category 'process primitive support') -----
checkForEventsMayContextSwitch: mayContextSwitch
"Check for possible interrupts and handle one if necessary.
Answer if a context switch has occurred."
| switched sema now |
<inline: false>
<var: #now type: #usqLong>
statCheckForEvents := statCheckForEvents + 1.
"restore the stackLimit if it has been smashed."
self restoreStackLimit.
self externalWriteBackHeadFramePointers.
self assert: stackPage = stackPages mostRecentlyUsedPage.
"Allow the platform to do anything it needs to do synchronously."
self ioSynchronousCheckForEvents.
self checkCogCompiledCodeCompactionCalledFor.
objectMemory needGCFlag ifTrue:
["sufficientSpaceAfterGC: runs the incremental GC and
then, if not enough space is available, the fullGC."
(objectMemory sufficientSpaceAfterGC: 0) ifFalse:
[self setSignalLowSpaceFlagAndSaveProcess]].
mayContextSwitch ifFalse: [^false].
switched := false.
(profileProcess ~= objectMemory nilObject
or: [nextProfileTick > 0 and:[self ioHighResClock >= nextProfileTick]]) ifTrue:
[self zeroNextProfileTick.
"Take a sample (if not already done so) for the profiler if it is active. This
must be done before any of the synchronousSignals below or else we will
attribute a pause in ioRelinquishProcessor to the newly activated process."
profileProcess = objectMemory nilObject ifTrue:
[profileProcess := self activeProcess.
profileMethod := objectMemory nilObject].
"and signal the profiler semaphore if it is present"
(profileSemaphore ~= objectMemory nilObject
and: [self synchronousSignal: profileSemaphore]) ifTrue:
[switched := true]].
self cppIf: #LRPCheck
ifTrue:
[self checkDeliveryOfLongRunningPrimitiveSignal ifTrue:
[switched := true]].
objectMemory signalLowSpace ifTrue:
[objectMemory signalLowSpace: false. "reset flag"
sema := objectMemory splObj: TheLowSpaceSemaphore.
(sema ~= objectMemory nilObject
and: [self synchronousSignal: sema]) ifTrue:
[switched := true]].
+ self checkInvokeIOProcessEvents: (now := self ioUTCMicroseconds).
- "inIOProcessEvents prevents reentrancy into ioProcessEvents and allows disabling
- ioProcessEvents e.g. for native GUIs. We would like to manage that here but can't
- since the platform code may choose to call ioProcessEvents itself in various places."
- false
- ifTrue:
- [((now := self ioUTCMicroseconds) >= nextPollUsecs
- and: [inIOProcessEvents = 0]) ifTrue:
- [statIOProcessEvents := statIOProcessEvents + 1.
- inIOProcessEvents := inIOProcessEvents + 1.
- self ioProcessEvents. "sets interruptPending if interrupt key pressed; may callback"
- inIOProcessEvents > 0 ifTrue:
- [inIOProcessEvents := inIOProcessEvents - 1].
- nextPollUsecs := now + 20000
- "msecs to wait before next call to ioProcessEvents. Note that strictly
- speaking we might need to update 'now' at this point since
- ioProcessEvents could take a very long time on some platforms"]]
- ifFalse:
- [(now := self ioUTCMicroseconds) >= nextPollUsecs ifTrue:
- [statIOProcessEvents := statIOProcessEvents + 1.
- self ioProcessEvents. "sets interruptPending if interrupt key pressed; may callback"
- nextPollUsecs := now + 20000
- "msecs to wait before next call to ioProcessEvents. Note that strictly
- speaking we might need to update 'now' at this point since
- ioProcessEvents could take a very long time on some platforms"]].
interruptPending ifTrue:
[interruptPending := false.
"reset interrupt flag"
sema := objectMemory splObj: TheInterruptSemaphore.
(sema ~= objectMemory nilObject
and: [self synchronousSignal: sema]) ifTrue:
[switched := true]].
nextWakeupUsecs ~= 0 ifTrue:
[now >= nextWakeupUsecs ifTrue:
[nextWakeupUsecs := 0.
"set timer interrupt to 0 for 'no timer'"
sema := objectMemory splObj: TheTimerSemaphore.
(sema ~= objectMemory nilObject
and: [self synchronousSignal: sema]) ifTrue:
[switched := true]]].
"signal any pending finalizations"
pendingFinalizationSignals > 0 ifTrue:
[pendingFinalizationSignals := 0.
sema := objectMemory splObj: TheFinalizationSemaphore.
(sema ~= objectMemory nilObject
and: [self synchronousSignal: sema]) ifTrue:
[switched := true]].
"signal all semaphores in semaphoresToSignal"
self signalExternalSemaphores ifTrue:
[switched := true].
^switched!
Item was added:
+ ----- Method: StackInterpreter>>checkInvokeIOProcessEvents: (in category 'process primitive support') -----
+ checkInvokeIOProcessEvents: now
+ "inIOProcessEvents prevents reentrancy into ioProcessEvents and allows disabling
+ ioProcessEvents e.g. for native GUIs. We would like to manage that here but can't
+ since the platform code may choose to call ioProcessEvents itself in various places."
+ <inline: #always>
+ false
+ ifTrue:
+ [(now >= nextPollUsecs
+ and: [inIOProcessEvents = 0]) ifTrue:
+ [statIOProcessEvents := statIOProcessEvents + 1.
+ inIOProcessEvents := inIOProcessEvents + 1.
+ self ioProcessEvents. "sets interruptPending if interrupt key pressed; may callback"
+ inIOProcessEvents > 0 ifTrue:
+ [inIOProcessEvents := inIOProcessEvents - 1].
+ nextPollUsecs := now + 20000
+ "msecs to wait before next call to ioProcessEvents. Note that strictly
+ speaking we might need to update 'now' at this point since
+ ioProcessEvents could take a very long time on some platforms"]]
+ ifFalse:
+ [now >= nextPollUsecs ifTrue:
+ [statIOProcessEvents := statIOProcessEvents + 1.
+ self ioProcessEvents. "sets interruptPending if interrupt key pressed; may callback"
+ nextPollUsecs := now + 20000
+ "msecs to wait before next call to ioProcessEvents. Note that strictly
+ speaking we might need to update 'now' at this point since
+ ioProcessEvents could take a very long time on some platforms"]].!
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3364.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3364
Author: eem
Time: 17 April 2024, 4:13:25.775126 pm
UUID: c0aef66b-b635-4039-897e-d58fa07a050b
Ancestors: VMMaker.oscog-eem.3363
A better fix to the non-inlining of isAlien: in assert: is not to mark isAlien: as <inline: #always> but <inline: true>. That was a mistake on my part. Apologies.
=============== Diff against VMMaker.oscog-eem.3363 ===============
Item was changed:
----- Method: InterpreterPlugin>>isAlien: (in category 'alien support') -----
isAlien: oop
"Answer if oop is an Alien. We could ask if isWordsOrBytes: first, but that doesn't help. We still have to do the is:KindOf: walk.
We're not interested in fast falsehood, but as fast as possible truth, and with the current API this is it."
+ <inline: true>
- <inline: #always>
^interpreterProxy is: oop KindOfClass: interpreterProxy classAlien!
Item was changed:
----- Method: ThreadedFFIPlugin>>isDirectAlien: (in category 'primitive support') -----
isDirectAlien: oop
<inline: #always>
+ self assert: (self isAlien: oop).
- "self assert: (self isAlien: oop). -- nested inlining is ignored for #isAlien:. Expand here."
- self assert: (interpreterProxy is: oop KindOfClass: interpreterProxy classAlien).
^(self sizeField: oop) > 0!
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3363.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3363
Author: eem
Time: 17 April 2024, 4:08:09.099496 pm
UUID: ef2ede81-25f0-41f4-ab60-14f7bb01111a
Ancestors: VMMaker.oscog-mt.3362
A couple of methods should use objectMemory displayObject rather than access TheDisplay directly.
=============== Diff against VMMaker.oscog-mt.3362 ===============
Item was changed:
----- Method: StackInterpreter>>postGCUpdateDisplayBits (in category 'object memory support') -----
postGCUpdateDisplayBits
"Update the displayBits after a GC may have moved it.
Answer if the displayBits appear valid. The wrinkle here is that the displayBits could be a surface handle."
<inline: false>
| displayObj bitsOop bitsNow |
+ displayObj := objectMemory displayObject.
- displayObj := objectMemory splObj: TheDisplay.
((objectMemory isPointers: displayObj)
and: [(objectMemory lengthOf: displayObj) >= 4]) ifFalse:
[^false].
bitsOop := objectMemory followOopField: 0 ofObject: displayObj.
(bitsOop = objectMemory nilObject "it ain't yet set"
or: [objectMemory isIntegerObject: bitsOop]) ifTrue: "It's a surface; our work here is done..."
[^true].
self assert: ((objectMemory addressCouldBeObj: bitsOop)
and: [objectMemory isWordsOrBytes: bitsOop]).
(objectMemory hasSpurMemoryManagerAPI
and: [objectMemory isPinned: bitsOop]) ifFalse:
[(objectMemory hasSpurMemoryManagerAPI
and: [stackPage notNil]) ifTrue: "If stackPage is nil we're snapshotting and now is not the time to pin."
[objectMemory pinObject: bitsOop.
bitsOop := objectMemory followOopField: 0 ofObject: displayObj].
bitsNow := self cCode: [objectMemory firstIndexableField: bitsOop]
inSmalltalk: [(objectMemory firstIndexableField: bitsOop) asInteger].
displayBits ~= bitsNow ifTrue:
[displayBits := bitsNow.
self ioNoteDisplayChanged: displayBits width: displayWidth height: displayHeight depth: displayDepth]].
^true!
Item was changed:
----- Method: StackInterpreter>>showDisplayBits:Left:Top:Right:Bottom: (in category 'I/O primitive support') -----
showDisplayBits: aForm Left: l Top: t Right: r Bottom: b
"Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object."
(deferDisplayUpdates
+ or: [aForm ~= objectMemory displayObject]) ifTrue: [^nil].
- or: [aForm ~= (objectMemory splObj: TheDisplay)]) ifTrue: [^nil].
self updateDisplayLeft: l Top: t Right: r Bottom: b!
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 8e5c04d2d4fbbb1f6357fa7193790e7e261b0d50
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/8e5c04d2d4fbbb1f63…
Author: Marcel Taeumel <marcel.taeumel(a)hpi.de>
Date: 2024-04-16 (Tue, 16 Apr 2024)
Changed paths:
M src/plugins/FilePlugin/FilePlugin.c
M src/plugins/SocketPlugin/SocketPlugin.c
M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
M src/plugins/SqueakFFIPrims/ARM64AppleFFIPlugin.c
M src/plugins/SqueakFFIPrims/ARM64FFIPlugin.c
M src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
M src/plugins/SqueakFFIPrims/RiscV64FFIPlugin.c
M src/plugins/SqueakFFIPrims/SqueakFFIPrims.c
M src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c
M src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c
M src/plugins/SqueakSSL/SqueakSSL.c
M src/spur32.cog.lowcode/cointerp.c
M src/spur32.cog.lowcode/cointerp.h
M src/spur32.cog.lowcode/gcc3x-cointerp.c
M src/spur32.cog.lowcode/interp.h
M src/spur32.cog/cointerp.c
M src/spur32.cog/cointerp.h
M src/spur32.cog/cointerpmt.c
M src/spur32.cog/cointerpmt.h
M src/spur32.cog/gcc3x-cointerp.c
M src/spur32.cog/gcc3x-cointerpmt.c
M src/spur32.cog/interp.h
M src/spur32.sista/cointerp.c
M src/spur32.sista/cointerp.h
M src/spur32.sista/gcc3x-cointerp.c
M src/spur32.sista/interp.h
M src/spur32.stack.newspeak/gcc3x-interp.c
M src/spur32.stack.newspeak/interp.c
M src/spur32.stack.newspeak/interp.h
M src/spur32.stack.newspeak/vmCallback.h
M src/spur32.stack/gcc3x-interp.c
M src/spur32.stack/interp.c
M src/spur32.stack/interp.h
M src/spur32.stack/validImage.c
M src/spur32.stack/vmCallback.h
M src/spur64.cog/cointerp.c
M src/spur64.cog/cointerp.h
M src/spur64.cog/cointerpmt.c
M src/spur64.cog/cointerpmt.h
M src/spur64.cog/gcc3x-cointerp.c
M src/spur64.cog/gcc3x-cointerpmt.c
M src/spur64.cog/interp.h
M src/spur64.sista/cointerp.c
M src/spur64.sista/cointerp.h
M src/spur64.sista/gcc3x-cointerp.c
M src/spur64.sista/interp.h
M src/spur64.stack/gcc3x-interp.c
M src/spur64.stack/interp.c
M src/spur64.stack/interp.h
M src/spur64.stack/validImage.c
M src/v3.cog/cointerp.c
M src/v3.cog/cointerp.h
M src/v3.cog/gcc3x-cointerp.c
M src/v3.cog/interp.h
M src/v3.stack/gcc3x-interp.c
M src/v3.stack/interp.c
M src/v3.stack/interp.h
Log Message:
-----------
CogVM source as per VMMaker.oscog-mt.3362 [ci skip]
Commit: d926670ee26591e2fe4a33c7aae2569c4679e726
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/d926670ee26591e2fe…
Author: Marcel Taeumel <marcel.taeumel(a)hpi.de>
Date: 2024-04-16 (Tue, 16 Apr 2024)
Changed paths:
M platforms/Cross/plugins/IA32ABI/arm32abicc.c
M platforms/Cross/plugins/IA32ABI/arm64abicc.c
M platforms/Cross/plugins/IA32ABI/ia32abicc.c
M platforms/Cross/plugins/IA32ABI/riscv64abicc.c
M platforms/Cross/plugins/IA32ABI/x64sysvabicc.c
M platforms/Cross/plugins/IA32ABI/x64win64abicc.c
M platforms/Cross/vm/sqVirtualMachine.c
M platforms/Cross/vm/sqVirtualMachine.h
Log Message:
-----------
Adjust cross-platform code for new disownVM/ownVM API.
Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/1b153ff230c2...d9…
To unsubscribe from these emails, change your notification settings at https://github.com/OpenSmalltalk/opensmalltalk-vm/settings/notifications
Marcel Taeumel uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-mt.3360.mcz
==================== Summary ====================
Name: VMMaker.oscog-mt.3360
Author: mt
Time: 16 April 2024, 5:51:20.916284 pm
UUID: b2275220-8fc2-1c4a-b3cf-e5e943310c0f
Ancestors: VMMaker.oscog-mt.3359
For COGMTVM, ensure that thread subsystem is initalized *before* the heartbeat thread is started, because the heartbeat might already rely on it.
While this does not seem to be necessary on Linux, Windows will directly fire up the heartbeat and thus, for example, crash the thread logging.
=============== Diff against VMMaker.oscog-mt.3359 ===============
Item was changed:
----- Method: CoInterpreterMT>>initialEnterSmalltalkExecutive (in category 'initialization') -----
initialEnterSmalltalkExecutive
"Main entry-point into the interpreter at system start-up."
"Ensure that the myList of the activeProcess is nil. Needed to load
old images which don't nil myList in transferTo:{from:}"
objectMemory storePointerUnchecked: MyListIndex ofObject: self activeProcess withValue: objectMemory nilObject.
- cogThreadManager startThreadSubsystem.
self threadSchedulingLoop: (cogThreadManager vmThreadAt: 1).
"NOTREACHED. The following is to fool Slang"
self threadSchedulingLoopImplementation: cogThreadManager currentVMThread!
Item was changed:
----- Method: CoInterpreterMT>>loadInitialContext (in category 'initialization') -----
loadInitialContext
| activeProc threadAffinity |
super loadInitialContext.
activeProc := self activeProcess.
threadAffinity := self threadAffinityOfProcess: activeProc.
self assert: (threadAffinity = 0 or: [threadAffinity = 1]).
self cCode: [] inSmalltalk: [self flag: #todoMT "Ensure we cannot save an image, where the 'activeProc' is affined to another thread!!"].
+ activeProcessAffined := threadAffinity ~= 0.
+
+ cogThreadManager startThreadSubsystem.!
- activeProcessAffined := threadAffinity ~= 0!