989 This is only used with win32's native threads." |
989 This is only used with win32's native threads." |
990 |
990 |
991 |index pri aProcess l| |
991 |index pri aProcess l| |
992 |
992 |
993 OperatingSystem interruptsBlocked ifFalse:[ |
993 OperatingSystem interruptsBlocked ifFalse:[ |
994 MiniDebugger |
994 MiniDebugger |
995 enterWithMessage:'resumeImmediateInterrupt with no interruptsBlocked' |
995 enterWithMessage:'resumeImmediateInterrupt with no interruptsBlocked' |
996 mayProceed:true. |
996 mayProceed:true. |
997 ]. |
997 ]. |
998 index := KnownProcessIds identityIndexOf:id. |
998 index := KnownProcessIds identityIndexOf:id. |
999 index ~~ 0 ifTrue:[ |
999 index ~~ 0 ifTrue:[ |
1000 aProcess := KnownProcesses at:index. |
1000 aProcess := KnownProcesses at:index. |
1001 "/ |
1001 "/ |
1002 "/ CG: the situation below may happen, if the wrapCall |
1002 "/ CG: the situation below may happen, if the wrapCall |
1003 "/ finishes before the process was layed to sleep |
1003 "/ finishes before the process was layed to sleep |
1004 "/ (i.e. schedulerIRQ arrives before the threadSwitch |
1004 "/ (i.e. schedulerIRQ arrives before the threadSwitch |
1005 "/ was finished. |
1005 "/ was finished. |
1006 "/ In that case, simply resume it and everything is OK. |
1006 "/ In that case, simply resume it and everything is OK. |
1007 "/ |
1007 "/ |
1008 "/ aProcess state ~~ #wrapWait ifTrue:[ |
1008 "/ aProcess state ~~ #wrapWait ifTrue:[ |
1009 "/ 'ProcSched [info]: oops - resumeImmIRQ for non wrapWait process' infoPrintCR. |
1009 "/ 'ProcSched [info]: oops - resumeImmIRQ for non wrapWait process' infoPrintCR. |
1010 "/ ^ self |
1010 "/ ^ self |
1011 "/ ]. |
1011 "/ ]. |
1012 pri := aProcess priority. |
1012 pri := aProcess priority. |
1013 l := quiescentProcessLists at:pri. |
1013 l := quiescentProcessLists at:pri. |
1014 "if already running, ignore" |
1014 "if already running, ignore" |
1015 l notNil ifTrue:[ |
1015 l notNil ifTrue:[ |
1016 (l identityIndexOf:aProcess) ~~ 0 ifTrue:[ |
1016 (l identityIndexOf:aProcess) ~~ 0 ifTrue:[ |
1017 'ProcSched [info]: oops - resumeImmIRQ for already running process' infoPrintCR. |
1017 'ProcSched [info]: oops - resumeIRQ for already running process' infoPrintCR. |
1018 ^ self |
1018 ^ self |
1019 ] |
1019 ] |
1020 ] ifFalse:[ |
1020 ] ifFalse:[ |
1021 l := LinkedList new. |
1021 l := LinkedList new. |
1022 quiescentProcessLists at:pri put:l. |
1022 quiescentProcessLists at:pri put:l. |
1023 ]. |
1023 ]. |
1024 l addLast:aProcess. |
1024 l addLast:aProcess. |
1025 aProcess state:#run. |
1025 aProcess state:#run. |
1026 ] ifFalse:[ |
1026 ] ifFalse:[ |
1027 'ProcSched [info]: oops - resumeImmIRQ for unknown process' infoPrintCR. |
1027 'ProcSched [info]: oops - resumeIRQ for unknown process: ' infoPrint. |
|
1028 id infoPrintCR. |
1028 ] |
1029 ] |
1029 |
1030 |
1030 "Modified: / 28.9.1998 / 11:36:53 / cg" |
1031 "Modified: / 28.9.1998 / 11:36:53 / cg" |
1031 ! ! |
1032 ! ! |
1032 |
1033 |