checkin from browser
authorClaus Gittinger <cg@exept.de>
Tue, 24 Sep 1996 10:19:50 +0200
changeset 1683 f7fed00976ab
parent 1682 a46393217364
child 1684 98ce4d199c9b
checkin from browser
ProcSched.st
ProcessorScheduler.st
--- a/ProcSched.st	Mon Sep 23 18:39:56 1996 +0200
+++ b/ProcSched.st	Tue Sep 24 10:19:50 1996 +0200
@@ -10,8 +10,6 @@
  hereby transferred.
 "
 
-'From Smalltalk/X, Version:2.10.9 on 23-sep-1996 at 14:25:15'                   !
-
 Object subclass:#ProcessorScheduler
 	instanceVariableNames:'quiescentProcessLists scheduler zombie activeProcess
 		currentPriority readFdArray readSemaphoreArray readCheckArray
@@ -1596,6 +1594,24 @@
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
 !
 
+signal:aSemaphore
+    "arrange for a semaphore to be triggered as soon as possible.
+     The actual signalling is performed slightly delayed, when the dispatcher
+     looks for a process to resume.
+     This is provided as entry for primitive code using __STX_SignalSemaphore(). 
+     Normal smalltalk code should send an appropriate message directly
+     to the semaphore."
+
+    |now wasBlocked|
+
+    wasBlocked := OperatingSystem blockInterrupts.
+    now := OperatingSystem getMillisecondTime.
+    self signal:aSemaphore atMilliseconds:now.
+    wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+
+    "Created: 24.9.1996 / 10:18:45 / cg"
+!
+
 signal:aSemaphore afterMilliseconds:millis
     "arrange for a semaphore to be triggered after some milliseconds"
 
@@ -2235,6 +2251,6 @@
 !ProcessorScheduler  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.93 1996-09-23 14:06:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.94 1996-09-24 08:19:50 cg Exp $'
 ! !
 ProcessorScheduler initialize!
--- a/ProcessorScheduler.st	Mon Sep 23 18:39:56 1996 +0200
+++ b/ProcessorScheduler.st	Tue Sep 24 10:19:50 1996 +0200
@@ -10,8 +10,6 @@
  hereby transferred.
 "
 
-'From Smalltalk/X, Version:2.10.9 on 23-sep-1996 at 14:25:15'                   !
-
 Object subclass:#ProcessorScheduler
 	instanceVariableNames:'quiescentProcessLists scheduler zombie activeProcess
 		currentPriority readFdArray readSemaphoreArray readCheckArray
@@ -1596,6 +1594,24 @@
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
 !
 
+signal:aSemaphore
+    "arrange for a semaphore to be triggered as soon as possible.
+     The actual signalling is performed slightly delayed, when the dispatcher
+     looks for a process to resume.
+     This is provided as entry for primitive code using __STX_SignalSemaphore(). 
+     Normal smalltalk code should send an appropriate message directly
+     to the semaphore."
+
+    |now wasBlocked|
+
+    wasBlocked := OperatingSystem blockInterrupts.
+    now := OperatingSystem getMillisecondTime.
+    self signal:aSemaphore atMilliseconds:now.
+    wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+
+    "Created: 24.9.1996 / 10:18:45 / cg"
+!
+
 signal:aSemaphore afterMilliseconds:millis
     "arrange for a semaphore to be triggered after some milliseconds"
 
@@ -2235,6 +2251,6 @@
 !ProcessorScheduler  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.93 1996-09-23 14:06:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.94 1996-09-24 08:19:50 cg Exp $'
 ! !
 ProcessorScheduler initialize!