[PATCH 3/3] gc: Pass register state to gc_start() and gc_safepoint()

2009-09-16 Thread Pekka Enberg
Save registers in gc_alloc() and pass them to gc_safepoint() so the latter can scan them for references. Also save the registers in signal handler and pass them to gc_safepoint(). We need to use pre-allocated thread-local memory because we can't use the stack or malloc() in the signal handler. Cc:

[PATCH 2/3] x86-64: Register state saving

2009-09-16 Thread Pekka Enberg
Add save_registers() and save_signal_registers() to x86-64 as well. Cc: Eduard - Gabriel Munteanu Cc: Tomek Grabiec Cc: Vegard Nossum Signed-off-by: Pekka Enberg --- arch/x86/include/arch/registers_64.h | 75 +++--- 1 files changed, 69 insertions(+), 6 deletions(

[PATCH 1/3] x86: Register state saving

2009-09-16 Thread Pekka Enberg
This patch introduces a save_registers() function that can be used to take a snapshot of general purpose registers. This is needed in the gc_alloc() function to save registers in case we need to enter a safepoint and need to scan them for references. We also need a save_signal_registers() function