about summary refs log tree commit diff
path: root/sysdeps/nptl/unwind-forcedunwind.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2015-01-05 14:01:49 -0800
committerRoland McGrath <roland@hack.frob.com>2015-01-05 15:42:16 -0800
commit46abb64d6287d09100b147d062f6810066389b7e (patch)
tree9102447cb3ce0baaf29cb4041d8bb915f1185225 /sysdeps/nptl/unwind-forcedunwind.c
parent61695fb2bab724ed69057c3eff03253708f96517 (diff)
downloadglibc-46abb64d6287d09100b147d062f6810066389b7e.tar.gz
glibc-46abb64d6287d09100b147d062f6810066389b7e.tar.xz
glibc-46abb64d6287d09100b147d062f6810066389b7e.zip
ARM: Consolidate with generic unwinder wrapper code
Diffstat (limited to 'sysdeps/nptl/unwind-forcedunwind.c')
-rw-r--r--sysdeps/nptl/unwind-forcedunwind.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/sysdeps/nptl/unwind-forcedunwind.c b/sysdeps/nptl/unwind-forcedunwind.c
index 4c8ef972a3..55768a5491 100644
--- a/sysdeps/nptl/unwind-forcedunwind.c
+++ b/sysdeps/nptl/unwind-forcedunwind.c
@@ -22,12 +22,12 @@
 #include <pthreadP.h>
 #include <sysdep.h>
 #include <gnu/lib-names.h>
+#include <unwind-resume.h>
 
 static void *libgcc_s_handle;
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
-static _Unwind_Reason_Code (*libgcc_s_personality)
-  (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
-   struct _Unwind_Context *);
+void (*__libgcc_s_resume) (struct _Unwind_Exception *exc)
+  attribute_hidden __attribute__ ((noreturn));
+static _Unwind_Reason_Code (*libgcc_s_personality) PERSONALITY_PROTO;
 static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
   (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
 static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *);
@@ -64,7 +64,7 @@ pthread_cancel_init (void)
     __libc_fatal (LIBGCC_S_SO " must be installed for pthread_cancel to work\n");
 
   PTR_MANGLE (resume);
-  libgcc_s_resume = resume;
+  __libgcc_s_resume = resume;
   PTR_MANGLE (personality);
   libgcc_s_personality = personality;
   PTR_MANGLE (forcedunwind);
@@ -90,6 +90,7 @@ __unwind_freeres (void)
     }
 }
 
+#if !HAVE_ARCH_UNWIND_RESUME
 void
 _Unwind_Resume (struct _Unwind_Exception *exc)
 {
@@ -98,27 +99,23 @@ _Unwind_Resume (struct _Unwind_Exception *exc)
   else
     atomic_read_barrier ();
 
-  void (*resume) (struct _Unwind_Exception *exc) = libgcc_s_resume;
+  void (*resume) (struct _Unwind_Exception *exc) = __libgcc_s_resume;
   PTR_DEMANGLE (resume);
   resume (exc);
 }
+#endif
 
 _Unwind_Reason_Code
-__gcc_personality_v0 (int version, _Unwind_Action actions,
-		      _Unwind_Exception_Class exception_class,
-		      struct _Unwind_Exception *ue_header,
-		      struct _Unwind_Context *context)
+__gcc_personality_v0 PERSONALITY_PROTO
 {
   if (__glibc_unlikely (libgcc_s_handle == NULL))
     pthread_cancel_init ();
   else
     atomic_read_barrier ();
 
-  _Unwind_Reason_Code (*personality)
-    (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
-     struct _Unwind_Context *) = libgcc_s_personality;
+  __typeof (libgcc_s_personality) personality = libgcc_s_personality;
   PTR_DEMANGLE (personality);
-  return personality (version, actions, exception_class, ue_header, context);
+  return (*personality) PERSONALITY_ARGS;
 }
 
 _Unwind_Reason_Code