[squeak-dev] The Inbox: Kernel-jar.1470.mcz

Jaromir Matas mail at jaromir.net
Tue May 31 15:46:25 UTC 2022


Thanks and apologies – no idea how it happened, not intended indeed!


From: Marcel Taeumel<mailto:marcel.taeumel at hpi.de>
Sent: Tuesday, May 31, 2022 16:23
To: squeak-dev<mailto:squeak-dev at lists.squeakfoundation.org>
Subject: Re: [squeak-dev] The Inbox: Kernel-jar.1470.mcz

Hi Jaromir --

I will cherrypick that #unwindTo:safely: because you mixed in an older version of #multipleBytecodeSetsActive by accident.

Best,
Marcel

Am 30.05.2022 17:55:19 schrieb Jaromir Matas <mail at jaromir.net>:
Thanks Marcel!! Now I hope nothing breaks ;)
I’ve just sent a little update to manage some extreme borderline situations.

I’ll send the corresponding tests later… in the spirit of:

p := Process forContext: [[] ensure: [Transcript show: 'been here']] priority: 50.
p runUntil: [:ctx | ctx selectorToSendOrSelf = #value].
p terminate

and:

bottom := Context contextEnsure: [Transcript show: 'been here too! '].
top := Context contextEnsure: [Processor activeProcess suspend. Transcript show: 'been here... '].
top privSender: bottom.
p := Process forContext: top priority: 50.
p resume.
p terminate

Thanks again!

--

Jaromír Matas

mail at jaromir.net

From: Marcel Taeumel<mailto:marcel.taeumel at hpi.de>
Sent: Monday, May 30, 2022 17:28
To: squeak-dev<mailto:squeak-dev at lists.squeakfoundation.org>
Subject: Re: [squeak-dev] The Inbox: Kernel-jar.1470.mcz

Hi Jaromir --

I just merged your efforts around primitive 578. :-)

Best,
Marcel

Am 30.05.2022 14:49:57 schrieb Jaromir Matas <mail at jaromir.net>:

Hi Marcel,

Hmm, never tried but it fails in a fresh trunk image and with all previous #terminate versions as well. Would it mean it has nothing to do with the latest changes in Kernel-jar.1470, Kernel-jar.1469 and Kernel-jar.1468?

Thanks!

Jaromir



From: Marcel Taeumel<mailto:marcel.taeumel at hpi.de>
Sent: Monday, May 30, 2022 14:13
To: squeak-dev<mailto:squeak-dev at lists.squeakfoundation.org>
Subject: Re: [squeak-dev] The Inbox: Kernel-jar.1470.mcz

+1000 Thanks! :-)

Just #testPrimitive100 is not passing ... is this expected?

Best,
Marcel

Am 29.05.2022 22:51:49 schrieb commits at source.squeak.org <commits at source.squeak.org>:
A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-jar.1470.mcz

==================== Summary ====================

Name: Kernel-jar.1470
Author: jar
Time: 29 May 2022, 10:51:34.061501 pm
UUID: 18469d29-2a9e-074d-b7e3-12d8d981f4b5
Ancestors: Kernel-jar.1469

one more oops; check suspendedContext for nil

=============== Diff against Kernel-jar.1469 ===============

Item was changed:
----- Method: Process>>suspendAndReleaseCriticalSection (in category 'private') -----
suspendAndReleaseCriticalSection
"Figure out if we are terminating a process that is in the ensure: block of a critical section.
If it hasn't made progress but is beyond the wait (which we can tell by the oldList being
one of the runnable lists, i.e. a LinkedList, not a Semaphore or Mutex, et al), then the ensure:
block needs to be run."

| oldList selectorJustSent |
"Suspend and unblock the receiver from a condition variable using suspend primitive #88.
It answers the list the receiver was on before the suspension."
oldList := self suspendAndUnblock.
(oldList isNil or: [oldList class == LinkedList]) ifFalse: [^self].

+ ((suspendedContext ifNil: [^self]) method pragmaAt: #criticalSection) ifNil: [^self].
- (suspendedContext method pragmaAt: #criticalSection) ifNil: [^self].
selectorJustSent := suspendedContext selectorJustSentOrSelf.

"If still at the wait the ensure: block has not been activated, so signal to restore."
selectorJustSent == #wait ifTrue:
[suspendedContext receiver signal].

"If still at the lock primitive and the lock primitive just acquired ownership (indicated by it answering false)
then the ensure block has not been activated, so explicitly primitiveExitCriticalSection to unlock."
(selectorJustSent == #primitiveEnterCriticalSection
or: [selectorJustSent == #primitiveTestAndSetOwnershipOfCriticalSection]) ifTrue:
[(suspendedContext stackPtr > 0
and: [suspendedContext top == false]) ifTrue:
[suspendedContext receiver primitiveExitCriticalSection]]!






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220531/08c7fe7c/attachment.html>


More information about the Squeak-dev mailing list