[Pkg] The Trunk: Kernel-ar.566.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Apr 11 10:13:40 UTC 2011


Andreas Raab uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ar.566.mcz

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

Name: Kernel-ar.566
Author: ar
Time: 11 April 2011, 12:12:58.781 pm
UUID: 0001d1a2-dc2b-1c44-b858-10e52be67b9f
Ancestors: Kernel-bf.565

Fixes a potential delay roll-over problem discovered by Gary Chambers.

=============== Diff against Kernel-bf.565 ===============

Item was changed:
  ----- Method: Delay class>>scheduleDelay: (in category 'timer process') -----
  scheduleDelay: aDelay
  	"Private. Schedule this Delay."
+ 	
+ 	aDelay resumptionTime: Time millisecondClockValue + aDelay delayDuration. 
+ 		"Gary Chambers:  do the above here, via the high priority timer process to avoid rollover bug due to process pre-emption
+ 		since the caller cannot use the AccessProtect semaphore."
  	aDelay beingWaitedOn: true.
+ 	ActiveDelay 
+ 		ifNil: [ActiveDelay := aDelay]
+ 		ifNotNil: [aDelay resumptionTime < ActiveDelay resumptionTime
+ 			ifTrue: [SuspendedDelays add: ActiveDelay.
+ 					ActiveDelay := aDelay]
+ 			ifFalse: [SuspendedDelays add: aDelay]]
- 	ActiveDelay ifNil:[
- 		ActiveDelay := aDelay
- 	] ifNotNil:[
- 		aDelay resumptionTime < ActiveDelay resumptionTime ifTrue:[
- 			SuspendedDelays add: ActiveDelay.
- 			ActiveDelay := aDelay.
- 		] ifFalse: [SuspendedDelays add: aDelay].
- 	].
  !

Item was added:
+ ----- Method: Delay>>resumptionTime: (in category 'private') -----
+ resumptionTime: anInteger
+ 	"Private!! Set the value of the system's millisecondClock at which the receiver's suspended Process will resumed.
+ 	Must only be called from the class-side #scheduleDelay:."
+ 	
+ 	resumptionTime := anInteger!

Item was changed:
  ----- Method: Delay>>schedule (in category 'private') -----
  schedule
+ 	"Schedule this delay."
+ 	
- 	"Schedule this delay"
  	beingWaitedOn ifTrue: [^self error: 'This Delay has already been scheduled.'].
+ 	AccessProtect critical: [
- 	resumptionTime := Time millisecondClockValue + delayDuration.
- 	AccessProtect critical:[
  		ScheduledDelay := self.
+ 		TimingSemaphore signal]!
- 		TimingSemaphore signal.
- 	].!



More information about the Packages mailing list