VM (callback+variables) changes
rtg at rochester.rr.com
Tue Jun 13 19:29:52 UTC 2006
My callback usage is intense but of limited variety, so the callback ids
are not much of a burden. Without an id, there would be no way to check
whether the callbacks were being exited in the proper order. For some
cases that might not be important, but it might also result in some
nasty bugs. How about making it optional by passing a null value?
On the process management question, I'm afraid I don't understand this
area well enough. Is your concern as aesthetic one, or are there
performance or correctness issues with your current implementation?
Andreas Raab wrote:
> Hi Rob -
> Good to hear it works. There are two things that bothers me slightly and
> I'd like to get some feedback from someone who's been in that area
> before: First, the callback identifier. While it seems a good safeguard
> at first it gets into ones way pretty quickly (like in the example
> plugin where the absence of callback-id management makes it impossible
> to have more than one callback). So... do you think it's worthwhile to
> keep it and force people to go through the hoops of maintaining it?
> Second, I'm somewhat unhappy about the management of the suspended
> processs. I am wondering if we shouldn't use a semaphore in the
> splObjects for this purpose and link/unlink properly. This has the
> disadvantage that some image-side changes are required but it might be
> worth it for better house-keeping.
> Comments welcome!
> - Andreas
> Rob Gayvert wrote:
>> This looks great. I tried this out with a fresh 3.9-7033 image and
>> latest Win32 VM source, and your example worked as advertised. It also
>> works fine as a replacement for my wxSqueak setjmp/longjmp calls, and
>> removes the need for an extra semaphore on the calling process. Thanks!
>> .. Rob
>> Andreas Raab wrote:
>>> Hi Folks -
>>> Attached my proposed changes for both, the variable tracking as well
>>> as the callback support. I'll respond in the individual threads about
>>> more specific issues; let's leave this one to discuss the more
>>> "mechanical" issues if there are any. Included files:
>>> - ExtraGCRoots.cs: The change set for tracking variables in plugins
>>> - Callbacks.cs: The change set for VM callback support
>>> - ExampleCallbacks.cs: An example plugin making use of both of the
>>> above features
>>> - sqVirtualMachine[.h|.c]: The (updated) VM proxy
>>> If you install all of the above and build a complete VM you should be
>>> able to execute the ExampleCallbackPlugin's exampleCallback and
>>> successfully compute 3+4 using a callback.
>>> Let me know if you have any problems.
>>> - Andreas
More information about the Vm-dev