From 43a94c647d037b62b55a67f53304a2d3f9d7f66c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 3 Jul 2014 22:19:41 -0700 Subject: IA64: Consolidate nptl/ subdirectories under linux/... --- sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c (limited to 'sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c') diff --git a/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c new file mode 100644 index 0000000000..8bc2e9721c --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include +#include + +static _Unwind_Word (*libgcc_s_getbsp) (struct _Unwind_Context *); + +#define ARCH_CANCEL_INIT(handle) \ + ((libgcc_s_getbsp = __libc_dlsym (handle, "_Unwind_GetBSP")) == NULL) + +#include + +_Unwind_Word +_Unwind_GetBSP (struct _Unwind_Context *context) +{ + if (__builtin_expect (libgcc_s_getbsp == NULL, 0)) + pthread_cancel_init (); + + return libgcc_s_getbsp (context); +} -- cgit 1.4.1