iSqueak Wikki : browserPluginReturnIfNeeded

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Revision [440]

Most recent edit made on 2010-09-12 22:57:15 by JohnMcIntosh

Additions:
See iPhone


Deletions:
TBD




Revision [265]

The oldest known version of this page was edited on 2008-10-19 05:24:22 by JohnMcIntosh

sqInt ioExit(void)

#define browserPluginReturnIfNeeded()

Parms: NONE
return: NONE, fake return of zero
From: Interpreter
Why:
To decide if we should exit the interpreter loop

Responsibility:
In the early days of running the virtual machine as a browser plugin it was designed that the VM would run on the same Thread as the browser, this required us to run the interpreter loop for a number of milliseconds then terminate control back to the caller so the browser's main thread could gain control. The browserPluginReturnIfNeeded would then get control every couple of milliseconds on a unconditional jump backwards, or on a message send, or on calling a primitive.

MacIntosh
os-9/OSXCarbon
#define browserPluginReturnIfNeeded() if (plugInTimeToReturn()) {ReturnFromInterpret();}
Where plugInTimeToReturn is returns true if gQuitNowRightNow is true.
#define ReturnFromInterpret() return

Cocoa:
TBD

iPhone
#define browserPluginReturnIfNeeded() if (plugInTimeToReturn()) {ReturnFromInterpret();}
Where plugInTimeToReturn is returns true if gQuitNowRightNow is true.
#define ReturnFromInterpret() return

For testing of memory leakage we enable this so that we can terminate the interpreter loop on 'quit'

Unix

Windows

BUGS

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.6685 seconds