--- a/ProcSched.st Fri Jan 10 17:30:02 1997 +0100
+++ b/ProcSched.st Fri Jan 10 18:47:55 1997 +0100
@@ -156,14 +156,15 @@
"
allow configurations without processes
+ (but such configurations are no longer distributed)
"
PureEventDriven := self threadsAvailable not.
PureEventDriven ifTrue:[
- 'PROCESSOR: no process support - running event driven' errorPrintNL
+ 'Processor [error]: no process support - running event driven' errorPrintCR
].
- "Modified: 7.3.1996 / 19:22:49 / cg"
"Modified: 23.9.1996 / 14:24:50 / stefan"
+ "Modified: 10.1.1997 / 18:03:03 / cg"
! !
!ProcessorScheduler class methodsFor:'instance creation'!
@@ -199,7 +200,7 @@
(KnownProcesses at:index) == 0 ifTrue:[
id := KnownProcessIds at:index.
id notNil ifTrue:[
- 'PROCESSOR: terminating thread ' errorPrint.
+ 'Processor [warning]: terminating thread ' errorPrint.
id errorPrint.
' (no longer refd)' errorPrintNL.
@@ -212,6 +213,7 @@
]
"Created: 7.1.1997 / 16:45:42 / stefan"
+ "Modified: 10.1.1997 / 18:03:07 / cg"
! !
!ProcessorScheduler class methodsFor:'primitive process primitives'!
@@ -621,7 +623,7 @@
dispatchAction := [self dispatch].
handlerAction := [:ex |
- ('ProcessorScheduler [info]: ignored signal (', ex signal printString, ')') infoPrintNL.
+ ('Processor [info]: ignored signal (', ex signal printString, ')') infoPrintCR.
ex return
].
@@ -641,10 +643,10 @@
"/ when the last process at or above UserSchedulingPriority process died.
"/ regular ST/X stays in above loop forever
- 'PROCESSOR: finish dispatch (no more processes)' infoPrintNL.
+ 'Processor [info]: finish dispatch (no more processes)' infoPrintNL.
"Modified: 23.9.1996 / 14:19:56 / stefan"
- "Modified: 10.1.1997 / 15:09:25 / cg"
+ "Modified: 10.1.1997 / 18:03:17 / cg"
!
exitWhenNoMoreUserProcesses:aBoolean
@@ -834,12 +836,12 @@
destroy the bad process
"
p id ~~ 0 ifTrue:[
- 'PROCESSOR: problem with process ' errorPrint.
+ 'Processor [warning]: problem with process ' errorPrint.
p id errorPrint.
p name notNil ifTrue:[
' (' errorPrint. p name errorPrint. ')' errorPrint.
].
- '; hard-terminate it.' errorPrintNL.
+ '; hard-terminate it.' errorPrintCR.
p state:#suspended.
self terminateNoSignal:p.
]
@@ -1193,26 +1195,26 @@
prio := HighestPriority.
listArray := quiescentProcessLists.
[prio >= 1] whileTrue:[
- l := listArray at:prio.
- l notNil ifTrue:[
- l notEmpty ifTrue:[
- p := l first.
- "
- if it got corrupted somehow ...
- "
- p id isNil ifTrue:[
- 'PROCESSOR: process with nil id removed' errorPrintNL.
- l removeFirst.
- ^ nil.
- ].
- ^ p
- ]
- ].
- prio := prio - 1
+ l := listArray at:prio.
+ l notNil ifTrue:[
+ l notEmpty ifTrue:[
+ p := l first.
+ "
+ if it got corrupted somehow ...
+ "
+ p id isNil ifTrue:[
+ 'Processor [warning]: process with nil id removed' errorPrintCR.
+ l removeFirst.
+ ^ nil.
+ ].
+ ^ p
+ ]
+ ].
+ prio := prio - 1
].
^ nil
- "Modified: 29.7.1996 / 11:49:47 / cg"
+ "Modified: 10.1.1997 / 18:03:28 / cg"
!
isPureEventDriven
@@ -1460,7 +1462,7 @@
"
(l isNil or:[(l remove:aProcess ifAbsent:[]) isNil]) ifTrue:[
wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
- 'PROCESSOR: bad suspend: not on run list' errorPrintNL.
+ 'Processor [warning]: bad suspend: not on run list' errorPrintCR.
"/ MiniDebugger enterWithMessage:'bad suspend: not on run list'.
self threadSwitch:scheduler.
^ self
@@ -1478,8 +1480,8 @@
self threadSwitch:p
].
- "Modified: 29.7.1996 / 11:52:16 / cg"
"Modified: 23.9.1996 / 13:49:24 / stefan"
+ "Modified: 10.1.1997 / 18:04:01 / cg"
!
terminate:aProcess
@@ -1576,8 +1578,8 @@
debugging consistency check - will be removed later
"
activeProcess priority ~~ currentPriority ifTrue:[
- 'PROCESSOR: oops - process changed priority' errorPrintNL.
- currentPriority := activeProcess priority.
+ 'Processor [warning]: process changed its priority' errorPrintCR.
+ currentPriority := activeProcess priority.
].
l := quiescentProcessLists at:currentPriority.
@@ -1587,29 +1589,29 @@
debugging consistency checks - will be removed later
"
sz == 0 ifTrue:[
- wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
- 'PROCESSOR: oops - empty runnable list' errorPrintNL.
- ^ self
+ wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+ 'Processor [warning]: empty runnable list' errorPrintCR.
+ ^ self
].
"
check if the running process is not the only one
"
sz ~~ 1 ifTrue:[
- "
- bring running process to the end
- "
- l removeFirst.
- l addLast:activeProcess.
-
- "
- and switch to first in the list
- "
- self threadSwitch:(l first).
+ "
+ bring running process to the end
+ "
+ l removeFirst.
+ l addLast:activeProcess.
+
+ "
+ and switch to first in the list
+ "
+ self threadSwitch:(l first).
].
wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
- "Modified: 29.7.1996 / 11:55:53 / cg"
+ "Modified: 10.1.1997 / 18:04:35 / cg"
! !
!ProcessorScheduler methodsFor:'semaphore signalling'!
@@ -2140,47 +2142,47 @@
readFdArray/writeFdArray in the debugger)"
readFdArray keysAndValuesDo:[:idx :fd |
- |rslt sema|
-
- rslt := OperatingSystem
- selectOnAnyReadable:(Array with:fd)
- writable:nil
- exception:nil
- withTimeOut:0.
-
- (rslt isNil and:[OperatingSystem lastErrorSymbol == #EBADF]) ifTrue:[
- ('PROCESSOR: removing invalid read fileDescriptor: ' , fd printString) errorPrintNL.
- readFdArray at:idx put:nil.
- OperatingSystem clearLastErrorNumber.
- (sema := readSemaphoreArray at:idx) notNil ifTrue:[
- readSemaphoreArray at:idx put:nil.
- sema signal.
- ].
- ]
+ |rslt sema|
+
+ rslt := OperatingSystem
+ selectOnAnyReadable:(Array with:fd)
+ writable:nil
+ exception:nil
+ withTimeOut:0.
+
+ (rslt isNil and:[OperatingSystem lastErrorSymbol == #EBADF]) ifTrue:[
+ ('Processor [warning]: removing invalid read fileDescriptor: ' , fd printString) errorPrintCR.
+ readFdArray at:idx put:nil.
+ OperatingSystem clearLastErrorNumber.
+ (sema := readSemaphoreArray at:idx) notNil ifTrue:[
+ readSemaphoreArray at:idx put:nil.
+ sema signal.
+ ].
+ ]
].
writeFdArray keysAndValuesDo:[:idx :fd |
- |rslt sema|
-
- rslt := OperatingSystem
- selectOnAnyReadable:nil
- writable:(Array with:fd)
- exception:nil
- withTimeOut:0.
-
- (rslt isNil and:[OperatingSystem lastErrorSymbol == #EBADF]) ifTrue:[
- ('PROCESSOR: removing invalid write fileDescriptor: ' , fd printString) errorPrintNL.
- writeFdArray at:idx put:nil.
- OperatingSystem clearLastErrorNumber.
- (sema := writeSemaphoreArray at:idx) notNil ifTrue:[
- writeSemaphoreArray at:idx put:nil.
- sema signal.
- ].
- ]
+ |rslt sema|
+
+ rslt := OperatingSystem
+ selectOnAnyReadable:nil
+ writable:(Array with:fd)
+ exception:nil
+ withTimeOut:0.
+
+ (rslt isNil and:[OperatingSystem lastErrorSymbol == #EBADF]) ifTrue:[
+ ('Processor [warning]: removing invalid write fileDescriptor: ' , fd printString) errorPrintCR.
+ writeFdArray at:idx put:nil.
+ OperatingSystem clearLastErrorNumber.
+ (sema := writeSemaphoreArray at:idx) notNil ifTrue:[
+ writeSemaphoreArray at:idx put:nil.
+ sema signal.
+ ].
+ ]
].
"Modified: 12.4.1996 / 09:32:58 / stefan"
- "Modified: 29.8.1996 / 22:42:28 / cg"
+ "Modified: 10.1.1997 / 18:03:51 / cg"
!
schedulerInterrupt
@@ -2328,6 +2330,6 @@
!ProcessorScheduler class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.105 1997-01-10 14:51:10 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.106 1997-01-10 17:47:55 cg Exp $'
! !
ProcessorScheduler initialize!
--- a/ProcessorScheduler.st Fri Jan 10 17:30:02 1997 +0100
+++ b/ProcessorScheduler.st Fri Jan 10 18:47:55 1997 +0100
@@ -156,14 +156,15 @@
"
allow configurations without processes
+ (but such configurations are no longer distributed)
"
PureEventDriven := self threadsAvailable not.
PureEventDriven ifTrue:[
- 'PROCESSOR: no process support - running event driven' errorPrintNL
+ 'Processor [error]: no process support - running event driven' errorPrintCR
].
- "Modified: 7.3.1996 / 19:22:49 / cg"
"Modified: 23.9.1996 / 14:24:50 / stefan"
+ "Modified: 10.1.1997 / 18:03:03 / cg"
! !
!ProcessorScheduler class methodsFor:'instance creation'!
@@ -199,7 +200,7 @@
(KnownProcesses at:index) == 0 ifTrue:[
id := KnownProcessIds at:index.
id notNil ifTrue:[
- 'PROCESSOR: terminating thread ' errorPrint.
+ 'Processor [warning]: terminating thread ' errorPrint.
id errorPrint.
' (no longer refd)' errorPrintNL.
@@ -212,6 +213,7 @@
]
"Created: 7.1.1997 / 16:45:42 / stefan"
+ "Modified: 10.1.1997 / 18:03:07 / cg"
! !
!ProcessorScheduler class methodsFor:'primitive process primitives'!
@@ -621,7 +623,7 @@
dispatchAction := [self dispatch].
handlerAction := [:ex |
- ('ProcessorScheduler [info]: ignored signal (', ex signal printString, ')') infoPrintNL.
+ ('Processor [info]: ignored signal (', ex signal printString, ')') infoPrintCR.
ex return
].
@@ -641,10 +643,10 @@
"/ when the last process at or above UserSchedulingPriority process died.
"/ regular ST/X stays in above loop forever
- 'PROCESSOR: finish dispatch (no more processes)' infoPrintNL.
+ 'Processor [info]: finish dispatch (no more processes)' infoPrintNL.
"Modified: 23.9.1996 / 14:19:56 / stefan"
- "Modified: 10.1.1997 / 15:09:25 / cg"
+ "Modified: 10.1.1997 / 18:03:17 / cg"
!
exitWhenNoMoreUserProcesses:aBoolean
@@ -834,12 +836,12 @@
destroy the bad process
"
p id ~~ 0 ifTrue:[
- 'PROCESSOR: problem with process ' errorPrint.
+ 'Processor [warning]: problem with process ' errorPrint.
p id errorPrint.
p name notNil ifTrue:[
' (' errorPrint. p name errorPrint. ')' errorPrint.
].
- '; hard-terminate it.' errorPrintNL.
+ '; hard-terminate it.' errorPrintCR.
p state:#suspended.
self terminateNoSignal:p.
]
@@ -1193,26 +1195,26 @@
prio := HighestPriority.
listArray := quiescentProcessLists.
[prio >= 1] whileTrue:[
- l := listArray at:prio.
- l notNil ifTrue:[
- l notEmpty ifTrue:[
- p := l first.
- "
- if it got corrupted somehow ...
- "
- p id isNil ifTrue:[
- 'PROCESSOR: process with nil id removed' errorPrintNL.
- l removeFirst.
- ^ nil.
- ].
- ^ p
- ]
- ].
- prio := prio - 1
+ l := listArray at:prio.
+ l notNil ifTrue:[
+ l notEmpty ifTrue:[
+ p := l first.
+ "
+ if it got corrupted somehow ...
+ "
+ p id isNil ifTrue:[
+ 'Processor [warning]: process with nil id removed' errorPrintCR.
+ l removeFirst.
+ ^ nil.
+ ].
+ ^ p
+ ]
+ ].
+ prio := prio - 1
].
^ nil
- "Modified: 29.7.1996 / 11:49:47 / cg"
+ "Modified: 10.1.1997 / 18:03:28 / cg"
!
isPureEventDriven
@@ -1460,7 +1462,7 @@
"
(l isNil or:[(l remove:aProcess ifAbsent:[]) isNil]) ifTrue:[
wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
- 'PROCESSOR: bad suspend: not on run list' errorPrintNL.
+ 'Processor [warning]: bad suspend: not on run list' errorPrintCR.
"/ MiniDebugger enterWithMessage:'bad suspend: not on run list'.
self threadSwitch:scheduler.
^ self
@@ -1478,8 +1480,8 @@
self threadSwitch:p
].
- "Modified: 29.7.1996 / 11:52:16 / cg"
"Modified: 23.9.1996 / 13:49:24 / stefan"
+ "Modified: 10.1.1997 / 18:04:01 / cg"
!
terminate:aProcess
@@ -1576,8 +1578,8 @@
debugging consistency check - will be removed later
"
activeProcess priority ~~ currentPriority ifTrue:[
- 'PROCESSOR: oops - process changed priority' errorPrintNL.
- currentPriority := activeProcess priority.
+ 'Processor [warning]: process changed its priority' errorPrintCR.
+ currentPriority := activeProcess priority.
].
l := quiescentProcessLists at:currentPriority.
@@ -1587,29 +1589,29 @@
debugging consistency checks - will be removed later
"
sz == 0 ifTrue:[
- wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
- 'PROCESSOR: oops - empty runnable list' errorPrintNL.
- ^ self
+ wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+ 'Processor [warning]: empty runnable list' errorPrintCR.
+ ^ self
].
"
check if the running process is not the only one
"
sz ~~ 1 ifTrue:[
- "
- bring running process to the end
- "
- l removeFirst.
- l addLast:activeProcess.
-
- "
- and switch to first in the list
- "
- self threadSwitch:(l first).
+ "
+ bring running process to the end
+ "
+ l removeFirst.
+ l addLast:activeProcess.
+
+ "
+ and switch to first in the list
+ "
+ self threadSwitch:(l first).
].
wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
- "Modified: 29.7.1996 / 11:55:53 / cg"
+ "Modified: 10.1.1997 / 18:04:35 / cg"
! !
!ProcessorScheduler methodsFor:'semaphore signalling'!
@@ -2140,47 +2142,47 @@
readFdArray/writeFdArray in the debugger)"
readFdArray keysAndValuesDo:[:idx :fd |
- |rslt sema|
-
- rslt := OperatingSystem
- selectOnAnyReadable:(Array with:fd)
- writable:nil
- exception:nil
- withTimeOut:0.
-
- (rslt isNil and:[OperatingSystem lastErrorSymbol == #EBADF]) ifTrue:[
- ('PROCESSOR: removing invalid read fileDescriptor: ' , fd printString) errorPrintNL.
- readFdArray at:idx put:nil.
- OperatingSystem clearLastErrorNumber.
- (sema := readSemaphoreArray at:idx) notNil ifTrue:[
- readSemaphoreArray at:idx put:nil.
- sema signal.
- ].
- ]
+ |rslt sema|
+
+ rslt := OperatingSystem
+ selectOnAnyReadable:(Array with:fd)
+ writable:nil
+ exception:nil
+ withTimeOut:0.
+
+ (rslt isNil and:[OperatingSystem lastErrorSymbol == #EBADF]) ifTrue:[
+ ('Processor [warning]: removing invalid read fileDescriptor: ' , fd printString) errorPrintCR.
+ readFdArray at:idx put:nil.
+ OperatingSystem clearLastErrorNumber.
+ (sema := readSemaphoreArray at:idx) notNil ifTrue:[
+ readSemaphoreArray at:idx put:nil.
+ sema signal.
+ ].
+ ]
].
writeFdArray keysAndValuesDo:[:idx :fd |
- |rslt sema|
-
- rslt := OperatingSystem
- selectOnAnyReadable:nil
- writable:(Array with:fd)
- exception:nil
- withTimeOut:0.
-
- (rslt isNil and:[OperatingSystem lastErrorSymbol == #EBADF]) ifTrue:[
- ('PROCESSOR: removing invalid write fileDescriptor: ' , fd printString) errorPrintNL.
- writeFdArray at:idx put:nil.
- OperatingSystem clearLastErrorNumber.
- (sema := writeSemaphoreArray at:idx) notNil ifTrue:[
- writeSemaphoreArray at:idx put:nil.
- sema signal.
- ].
- ]
+ |rslt sema|
+
+ rslt := OperatingSystem
+ selectOnAnyReadable:nil
+ writable:(Array with:fd)
+ exception:nil
+ withTimeOut:0.
+
+ (rslt isNil and:[OperatingSystem lastErrorSymbol == #EBADF]) ifTrue:[
+ ('Processor [warning]: removing invalid write fileDescriptor: ' , fd printString) errorPrintCR.
+ writeFdArray at:idx put:nil.
+ OperatingSystem clearLastErrorNumber.
+ (sema := writeSemaphoreArray at:idx) notNil ifTrue:[
+ writeSemaphoreArray at:idx put:nil.
+ sema signal.
+ ].
+ ]
].
"Modified: 12.4.1996 / 09:32:58 / stefan"
- "Modified: 29.8.1996 / 22:42:28 / cg"
+ "Modified: 10.1.1997 / 18:03:51 / cg"
!
schedulerInterrupt
@@ -2328,6 +2330,6 @@
!ProcessorScheduler class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.105 1997-01-10 14:51:10 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.106 1997-01-10 17:47:55 cg Exp $'
! !
ProcessorScheduler initialize!