ProcessorScheduler.st
changeset 5406 4a6995b61c0e
parent 5396 92bf7d0b1b66
child 5449 bf1de72fd2bb
equal deleted inserted replaced
5405:f07c8045ab4e 5406:4a6995b61c0e
   374     "return true, if the runtime system supports threads (i.e. processes);
   374     "return true, if the runtime system supports threads (i.e. processes);
   375      false otherwise."
   375      false otherwise."
   376 
   376 
   377 %{  /* NOCONTEXT */
   377 %{  /* NOCONTEXT */
   378     RETURN (__threadsAvailable());
   378     RETURN (__threadsAvailable());
   379 %}
   379 %}.
       
   380     ^ true
   380 ! !
   381 ! !
   381 
   382 
   382 !ProcessorScheduler class methodsFor:'queries'!
   383 !ProcessorScheduler class methodsFor:'queries'!
   383 
   384 
   384 isPureEventDriven
   385 isPureEventDriven
   816 
   817 
   817     |nPrios "{ Class: SmallInteger }"
   818     |nPrios "{ Class: SmallInteger }"
   818      p l|
   819      p l|
   819 
   820 
   820     KnownProcesses isNil ifTrue:[
   821     KnownProcesses isNil ifTrue:[
   821 	KnownProcesses := WeakArray new:30.
   822         KnownProcesses := WeakArray new:30.
   822 	KnownProcesses addDependent:self class.
   823         KnownProcesses addDependent:self class.
   823 	KnownProcessIds := OrderedCollection new.
   824         KnownProcessIds := OrderedCollection new.
   824     ].
   825     ].
   825 
   826 
   826     "
   827     "
   827      create a collection with process lists; accessed using the priority as key
   828      create a collection with process lists; accessed using the priority as key
   828     "
   829     "
   841     timeoutProcessArray := Array new:5.
   842     timeoutProcessArray := Array new:5.
   842 
   843 
   843     anyTimeouts := false.
   844     anyTimeouts := false.
   844     dispatching := false.
   845     dispatching := false.
   845     exitWhenNoMoreUserProcesses isNil ifTrue:[
   846     exitWhenNoMoreUserProcesses isNil ifTrue:[
   846 	exitWhenNoMoreUserProcesses := false. "/ mhmh - how about true ?
   847         exitWhenNoMoreUserProcesses := false. "/ mhmh - how about true ?
   847     ].
   848     ].
   848     useIOInterrupts := OperatingSystem supportsIOInterrupts.
   849     useIOInterrupts := OperatingSystem supportsIOInterrupts.
   849     gotIOInterrupt := false.
   850     gotIOInterrupt := false.
   850     osChildExitActions := Dictionary new.
   851     osChildExitActions := Dictionary new.
   851     gotChildSignalInterrupt := false.
   852     gotChildSignalInterrupt := false.
   870     l add:p.
   871     l add:p.
   871 
   872 
   872     "
   873     "
   873      let me handle IO and timer interrupts
   874      let me handle IO and timer interrupts
   874     "
   875     "
   875     ObjectMemory ioInterruptHandler:self.
   876     useIOInterrupts ifTrue:[ObjectMemory ioInterruptHandler:self].
   876     ObjectMemory timerInterruptHandler:self.
   877     ObjectMemory timerInterruptHandler:self.
   877     ObjectMemory childSignalInterruptHandler:self.
   878     ObjectMemory childSignalInterruptHandler:self.
   878 
   879 
   879     "Modified: / 7.1.1997 / 16:48:26 / stefan"
   880     "Modified: / 7.1.1997 / 16:48:26 / stefan"
   880     "Modified: / 4.2.1999 / 13:08:39 / cg"
   881     "Modified: / 4.2.1999 / 13:08:39 / cg"
  3109 ! !
  3110 ! !
  3110 
  3111 
  3111 !ProcessorScheduler class methodsFor:'documentation'!
  3112 !ProcessorScheduler class methodsFor:'documentation'!
  3112 
  3113 
  3113 version
  3114 version
  3114     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.185 2000-05-23 13:37:00 stefan Exp $'
  3115     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.186 2000-06-23 08:17:15 cg Exp $'
  3115 ! !
  3116 ! !
  3116 ProcessorScheduler initialize!
  3117 ProcessorScheduler initialize!