pj64team / Project64-Legacy

Finishing what we started.
79 stars 7 forks source link

Fix race condition when stopping the CPU while a watchpoint is trapped #52

Closed parasyte closed 1 year ago

parasyte commented 1 year ago

This uses strong (read and write) memory barriers to prevent instruction reordering when trying to stop the CPU thread while a watchpoint has trapped it.

The barrier strength can probably be reduced, but I'm a bit paranoid because the way this whole code base uses threads really has me on edge.