diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-27 00:43:33 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-27 00:43:33 +0000 |
commit | 269a36876f36a3a586e58ac9122bcd2453d98648 (patch) | |
tree | 86e32819d7f591c74fbd972b3aec948512e9ec6b /boehm-gc/linux_threads.c | |
parent | 0136a00b98c78ab453bbb93ad0811f8b72dbe336 (diff) | |
download | gcc-269a36876f36a3a586e58ac9122bcd2453d98648.tar.gz |
<<<<<<< ChangeLog
2000-04-26 Jakub Jelinek <jakub@redhat.com>
* gcconfig.h (SPARC): Define ALIGNMENT to 8 for 64bit SPARC.
(SPARC/LINUX): Use GC_SysVGetDataStart instead of LINUX_DATA_START
- sparc glibc does not provide it.
(SAVE_CALL_CHAIN, ASM_CLEAR_CODE): Define on sparc*-linux*.
Make STACKBOTTOM depend on the wordsize.
* os_dep.c (GC_SysVGetDataStart): Compile in on sparc*-linux*.
(struct frame): Declare on sparc*-linux*.
(GC_save_callers): Bias the frame pointers if needed (sparc64).
* mach_dep.c (GC_save_regs_in_stack): Optimize on sparc32.
Implement on sparc64.
(GC_clear_stack_inner): Implement on sparc64.
* gc_priv.h (GC_test_and_set): Implement for sparc.
* linux_threads.c (GC_suspend_handler, GC_push_all_stacks): Use
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33452 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/linux_threads.c')
-rw-r--r-- | boehm-gc/linux_threads.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/boehm-gc/linux_threads.c b/boehm-gc/linux_threads.c index d6cab0af4ce..c3f19b8ec57 100644 --- a/boehm-gc/linux_threads.c +++ b/boehm-gc/linux_threads.c @@ -152,7 +152,7 @@ static inline ptr_t GC_linux_thread_top_of_stack(void) return tos; } -#ifdef IA64 +#if defined(SPARC) || defined(IA64) extern word GC_save_regs_in_stack(); #endif @@ -177,7 +177,11 @@ void GC_suspend_handler(int sig) /* of a thread which holds the allocation lock in order */ /* to stop the world. Thus concurrent modification of the */ /* data structure is impossible. */ - me -> stack_ptr = (ptr_t)(&dummy); +# ifdef SPARC + me -> stack_ptr = (ptr_t)GC_save_regs_in_stack(); +# else + me -> stack_ptr = (ptr_t)(&dummy); +# endif # ifdef IA64 me -> backing_store_ptr = (ptr_t)GC_save_regs_in_stack(); # endif @@ -425,7 +429,11 @@ void GC_push_all_stacks() for (p = GC_threads[i]; p != 0; p = p -> next) { if (p -> flags & FINISHED) continue; if (pthread_equal(p -> id, me)) { +# ifdef SPARC + lo = (ptr_t)GC_save_regs_in_stack(); +# else lo = GC_approx_sp(); +# endif IF_IA64(bs_hi = (ptr_t)GC_save_regs_in_stack();) } else { lo = p -> stack_ptr; |