859 "evaluate the receiver with interrupts blocked. |
859 "evaluate the receiver with interrupts blocked. |
860 This does not prevent preemption by a higher priority processes |
860 This does not prevent preemption by a higher priority processes |
861 if any becomes runnable due to the evaluation of the receiver |
861 if any becomes runnable due to the evaluation of the receiver |
862 (i.e. if a semaphore is signalled)." |
862 (i.e. if a semaphore is signalled)." |
863 |
863 |
864 Processor activeProcess uninterruptablyDo:self |
864 |wasBlocked| |
|
865 |
|
866 wasBlocked := OperatingSystem blockInterrupts. |
|
867 ^ self valueNowOrOnUnwindDo:[wasBlocked ifTrue:[OperatingSystem unblockInterrupts]]. |
865 ! |
868 ! |
866 |
869 |
867 valueUnpreemptively |
870 valueUnpreemptively |
868 "evaluate the receiver without the possiblity of preemption |
871 "evaluate the receiver without the possiblity of preemption |
869 (i.e. at a very high priority)" |
872 (i.e. at a very high priority)" |
870 |
873 |
871 |oldPrio activeProcess| |
874 |oldPrio activeProcess| |
872 |
875 |
873 activeProcess := Processor activeProcess. |
876 activeProcess := Processor activeProcess. |
874 oldPrio := activeProcess changePriority:(Processor highestPriority). |
877 oldPrio := activeProcess changePriority:(Processor highestPriority). |
875 self valueNowOrOnUnwindDo:[ |
878 ^ self valueNowOrOnUnwindDo:[ |
876 activeProcess priority:oldPrio |
879 activeProcess priority:oldPrio |
877 ] |
880 ] |
878 ! ! |
881 ! ! |
879 |
882 |
880 !Block methodsFor:'process creation'! |
883 !Block methodsFor:'process creation'! |