diff options
author | Andreas Bregas <ab@openoffice.org> | 2001-09-07 13:51:02 +0000 |
---|---|---|
committer | Andreas Bregas <ab@openoffice.org> | 2001-09-07 13:51:02 +0000 |
commit | ba919fdc3ae877beaa5421ed04049d5125c845b8 (patch) | |
tree | 1654f6ce42d2afa9a2c6b484900e098c72358c8e /basic/source/runtime/runtime.cxx | |
parent | 84c1c72d391168232e1c80f4429922569cc07f73 (diff) |
#91147# Global flag to control rescheduling
Diffstat (limited to 'basic/source/runtime/runtime.cxx')
-rw-r--r-- | basic/source/runtime/runtime.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 6b750a02b21c..e1cb9f6ea61c 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -2,9 +2,9 @@ * * $RCSfile: runtime.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: ab $ $Date: 2001-09-04 11:15:16 $ + * last change: $Author: ab $ $Date: 2001-09-07 14:51:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -92,6 +92,16 @@ #include "segmentc.hxx" #pragma SW_SEGMENT_CLASS( SBRUNTIME, SBRUNTIME_CODE ) + +// #91147 Global reschedule flag +static BOOL bStaticGlobalEnableReschedule = TRUE; + +void StarBASIC::StaticEnableReschedule( BOOL bReschedule ) +{ + bStaticGlobalEnableReschedule = bReschedule; +} + + struct SbiGosubStack { // GOSUB-Stack: SbiGosubStack* pNext; // Chain const BYTE* pCode; // Return-Pointer @@ -570,7 +580,7 @@ BOOL SbiRuntime::Step() if( bRun ) { // Unbedingt gelegentlich die Kontrolle abgeben! - if( pInst->IsReschedule() && !( ++nOps & 0x1F ) ) + if( !( ++nOps & 0x1F ) && pInst->IsReschedule() && bStaticGlobalEnableReschedule ) Application::Reschedule(); SbiOpcode eOp = (SbiOpcode ) ( *pCode++ ); |