Hi Slava, You mentioned on twitter than you'd like to merge my changes soon. I've pushed my latest stuff (157 commits!) out to my reentrantvm-dev branch, which was rebased this morning (uk time).
http://github.com/phildawes/factor/tree/reentrantvm-dev http://phildawes.net/tmp/images/boot.x86.32.image http://phildawes.net/tmp/images/boot.unix-x86.64.image The good stuff -------------- - Factor runs reentrant without the vm singleton on win32, linux32 and linux64 (I've tested on these platforms). For some reason you can't run win32 gui on more than one os thread (at least in wine), but multiple guis are fine on linux. - There's a small vocab called mttest in extra which defines 'start-vm-in-os-thread' and a couple of other things for testing. The not so good stuff --------------------- - The signal handling is race-condition-tastic. I haven't put any mutexes around the vm lookup table yet. That said, segfault signals seem to get delivered to the right threads on both win and linux platforms which was a welcome surprise. - VMs call exit when they finish which takes down the whole process. I probably need to change this - It probably doesn't bootstrap at all on OSX as I've not been able to dev on this platform. If you want to try and fix this yourself then the approach I would take is: 1) set the FACTOR_SINGLE_THREADED flag at the bottom of vm.hpp. This makes all of the code use a vm singleton. - then try to figure out what caused the reported bootstrap crashes 2) Then set FACTOR_TESTING_MULTITHREADED. This keeps the singleton vm pointer but then uses the vm pointers passed from the basis/cpu.* assembler and asserts that they match the singleton. - There's some alien boxing stuff that appears to only be relevant on OSX (or at least I haven't yet found a way of getting it to fire on win32 or linux), so I would expect some assert crashes that'll need fixing in the same way as the other alien boxing stuff. N.B. I'd be quite happy to fix this up myself if you know of an OSX box I could have ssh access to. BTW I'm not precious about any of this code so feel free to rip stuff out as you see fit. I've steered away from changing the design of the vm as much as possible. Hope that's all ok Cheers, Phil ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
