about summary refs log tree commit diff
path: root/linuxthreads/ptlongjmp.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-31 08:00:19 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-31 08:00:19 +0000
commit416d2de60b8e567ac7cd6a581afba0f5cdfc932e (patch)
treeabd37640e253dae0e65751ea12f20253830bb269 /linuxthreads/ptlongjmp.c
parent89d6e4445954aee95d02b84db7af7fa0cca93195 (diff)
downloadglibc-416d2de60b8e567ac7cd6a581afba0f5cdfc932e.tar.gz
glibc-416d2de60b8e567ac7cd6a581afba0f5cdfc932e.tar.xz
glibc-416d2de60b8e567ac7cd6a581afba0f5cdfc932e.zip
Update.
2002-12-30  Ulrich Drepper  <drepper@redhat.com>

	* malloc/thread-m.h (thread_atfork): Define using __register_atfork.
Diffstat (limited to 'linuxthreads/ptlongjmp.c')
-rw-r--r--linuxthreads/ptlongjmp.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/linuxthreads/ptlongjmp.c b/linuxthreads/ptlongjmp.c
index 18592548ed..ece553141f 100644
--- a/linuxthreads/ptlongjmp.c
+++ b/linuxthreads/ptlongjmp.c
@@ -27,24 +27,23 @@ extern void __libc_longjmp (sigjmp_buf env, int val)
      __attribute__ ((noreturn));
 
 
-static void pthread_cleanup_upto(__jmp_buf target)
+void __pthread_cleanup_upto (__jmp_buf target, char *targetframe)
 {
   pthread_descr self = thread_self();
   struct _pthread_cleanup_buffer * c;
-  char *currentframe = CURRENT_STACK_FRAME;
 
   for (c = THREAD_GETMEM(self, p_cleanup);
        c != NULL && _JMPBUF_UNWINDS(target, c);
        c = c->__prev)
     {
 #if _STACK_GROWS_DOWN
-      if ((char *) c <= currentframe)
+      if ((char *) c <= targetframe)
 	{
 	  c = NULL;
 	  break;
 	}
 #elif _STACK_GROWS_UP
-      if ((char *) c >= currentframe)
+      if ((char *) c >= targetframe)
 	{
 	  c = NULL;
 	  break;
@@ -60,14 +59,12 @@ static void pthread_cleanup_upto(__jmp_buf target)
     THREAD_SETMEM(self, p_in_sighandler, NULL);
 }
 
-void siglongjmp(sigjmp_buf env, int val)
+void siglongjmp (sigjmp_buf env, int val)
 {
-  pthread_cleanup_upto(env->__jmpbuf);
-  __libc_siglongjmp(env, val);
+  __libc_siglongjmp (env, val);
 }
 
-void longjmp(jmp_buf env, int val)
+void longjmp (jmp_buf env, int val)
 {
-  pthread_cleanup_upto(env->__jmpbuf);
-  __libc_longjmp(env, val);
+  __libc_longjmp (env, val);
 }