Re: VGA emulation in BOCHS

Volker Ruppert <[email protected]>
Newsgroups gmane.comp.emulators.bochs.devel
Message-ID <[email protected]>
Hi!

> i am experimenting with parallelizing BOCHS. there are a few things i
> have done to bring paraBOCHS to the current state.
>
> 1. put cpu in separate threads.
> 2. make the code cache thread safety
> 3. exclusively locked the page when atomic instructions are emulated.
> 4. i am currently solving the x window problem.
>
> right now only the thread that is running BX_CPU(0) is calling the
> currCountDown, but i still get assertion from the libX library. could
> any other CPU thread be calling functions in libX at the same time if
> they run truly in parallel ?

When you did it correctly, only the cpu0 thread increments the timer 
tick. Then it checks if one of the timers has expired and if one did, it 
calls the associated timer handler. The other cpus should never call the 
timer code. The X11 gui code runs in the main thread and a timer call 
from the cpu0 thread could make it crash. You should have a look at the 
wx code and it's multi-threading implementation. The gui thread and the 
simulation thread use an event queue for the thread-safe communication.

--
Thanks

Volker


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.