summaryrefslogtreecommitdiff
path: root/mach_dep.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2007-07-02 17:17:46 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:41 +0400
commitf165469dd058eea45b2615399f51979be7237bed (patch)
tree3303a53c6bdf4c0b816aa31be11b8f49747e2343 /mach_dep.c
parentff97a96866512f7f642a0c3addc4ba2b36b3ee12 (diff)
downloadbdwgc-f165469dd058eea45b2615399f51979be7237bed.tar.gz
2007-07-02 Hans Boehm <Hans.Boehm@hp.com>
* mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on ARM/Linux. Check getcontext() return value.
Diffstat (limited to 'mach_dep.c')
-rw-r--r--mach_dep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mach_dep.c b/mach_dep.c
index eba019d3..4f05843c 100644
--- a/mach_dep.c
+++ b/mach_dep.c
@@ -174,10 +174,12 @@ void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
# if defined(HAVE_PUSH_REGS)
GC_push_regs();
-# elif defined(UNIX_LIKE) && !defined(DARWIN)
+# elif defined(UNIX_LIKE) && !defined(DARWIN) && !defined(ARM32)
/* Older versions of Darwin seem to lack getcontext(). */
+ /* ARM Linux often doesn't support a real getcontext(). */
ucontext_t ctxt;
- getcontext(&ctxt);
+ if (getcontext(&ctxt) < 0)
+ ABORT ("Getcontext failed: Use another register retrieval method?");
context = &ctxt;
# if defined(SPARC) || defined(IA64)
/* On a register window machine, we need to save register */