[Vm-dev] Running Alien on Windows
andreas.raab at gmx.de
Tue May 4 03:37:40 UTC 2010
Hi Igor -
Thanks for trying and feedback. Looks like there's a bit more work to
do. I agree that we should make interpret() reentrant and use an
approach like on Android. And we'll get there; it's just a matter of
finding time to work through the corner cases.
On 5/3/2010 6:51 PM, Igor Stasenko wrote:
> Btw, i am still insist that making interpret() reentrant and calling
> ioProcessEvents() outside of it, so it won't interfere with interpreter's
> state/temps/stack etc . would be much better and safer.
>> This cames from newspeak sources:
>> /* - Vassili, May 2008:
>> * The following is significantly revised compared to the original
>> Squeak implementation.
>> * The ioProcessEvent() function called from inside the interpreter
>> loop is now guarded
>> * with a lock called inIoProcessEvents. When the lock is> 0 the
>> function is effectively
>> * disabled. The lock is incremented on entering a callback and
>> decremented on returning
>> * from a callback. The lock is also accessible at the image level,
>> and Smalltalk code
>> * in the image can turn off this asynchronous event delivery. In that
>> case it should
>> * make its own arrangements to pick up and deliver events. For that,
>> an unguarded version
>> * of the same function is provided called primDrainEventQueue() which
>> is accessible
>> * as a primitive from inside the image.
>> /* This counter prevents reentering the ioProcessEvents message pump. It is
>> * also incremented in the callback machinery (in thunkEntry) since the image
>> * may be running its own message pump for the native GUI.
>> int inIoProcessEvents = 0;
>> int ioProcessEvents(void)
>> int result;
>> if (inIoProcessEvents)
>> return 1;
>> if (fRunService&& !fWindows95)
>> return 1;
>> result = primDrainEventQueue();
>> if (inIoProcessEvents> 0)
>> return result;
>> So, since it may require more patching in order to support this flag, i just
>> commented its use by alien plugin and finally were able to
>> successfully build it.
>> I am not sure if it in working state or not.
>> For those who wanna test it, you can get it here:
>> (i placed it there temporarily, so please, pick it up because i will
>> remove it in a few days)
>> Best regards,
>> Igor Stasenko AKA sig.
More information about the Vm-dev