/* Clean up stack frames unwound by longjmp. Linux version.
- Copyright (C) 1995, 1997, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1995-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
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, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <setjmp.h>
#include <stddef.h>
-#include <pthread-functions.h>
+#include <pthreadP.h>
extern void __pthread_cleanup_upto (__jmp_buf env, char *targetframe);
#pragma weak __pthread_cleanup_upto
_longjmp_unwind (jmp_buf env, int val)
{
#ifdef SHARED
-# define fptr __libc_pthread_functions.ptr___pthread_cleanup_upto
+ if (__libc_pthread_functions_init)
+ PTHFCT_CALL (ptr___pthread_cleanup_upto, (env->__jmpbuf,
+ CURRENT_STACK_FRAME));
#else
-# define fptr __pthread_cleanup_upto
+ if (__pthread_cleanup_upto != NULL)
+ __pthread_cleanup_upto (env->__jmpbuf, CURRENT_STACK_FRAME);
#endif
-
- if (fptr != NULL)
- fptr (env->__jmpbuf, __builtin_frame_address (0));
}