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

Marcel Taeumel marcel.taeumel at hpi.de
Mon May 30 15:28:33 UTC 2022


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/20220530/2e3866c7/attachment.html>


More information about the Squeak-dev mailing list