Status: Accepted
Owner:
[hidden email]
Labels: Milestone-1.3 Type-RequestForEnhancement Importance-High
New issue 3834 by
[hidden email]: Add support for Threaded VMs in
Process
http://code.google.com/p/pharo/issues/detail?id=3834By Eliot:
To enable threading you have to modify the Process class definition to
include threadId as its fourth inst var and tell the VM of that fact by
setting a bit in the image via vmParameterAt: (the below, also attached).
Link subclass: #Process
instanceVariableNames: 'suspendedContext priority myList threadId
errorHandler name island env'
classVariableNames: ''
poolDictionaries: ''
category: 'Kernel-Processes'!
SmalltalkImage methods for system attributes
processHasThreadIdInstVar: aBoolean
"The threaded VM needs to know if the 4th inst var of Process
is threadId which it uses to control process-to-thread binding.
This flag persists across snapshots, stored in the image header."
aBoolean ifTrue: [self assert: (Process instVarNames at: 4) ='threadId'].
self vmParameterAt: 48 put: ((self vmParameterAt: 48) bitClear: 1) +
(aBoolean ifTrue: [1] ifFalse: [0])
e.g.
"Ensure VM knows whether Process has threadId inst var or not."
Smalltalk processHasThreadIdInstVar: (Process instVarNames
includes: 'threadId').
Attachments:
SmalltalkImage-processHasThreadIdInstVar.st 585 bytes