2001-04-13  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_load_address):
	Calculate load address differently.
This commit is contained in:
Ulrich Drepper 2001-04-12 23:09:44 +00:00
parent b775be640a
commit a08877d0e0
5 changed files with 52 additions and 14 deletions

View File

@ -1,3 +1,8 @@
2001-04-13 Jakub Jelinek <jakub@redhat.com>
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_load_address):
Calculate load address differently.
2001-04-12 Bruno Haible <haible@clisp.cons.org> 2001-04-12 Bruno Haible <haible@clisp.cons.org>
* iconvdata/TESTS2: New file. * iconvdata/TESTS2: New file.

View File

@ -1,8 +1,14 @@
2001-04-12 Ulrich Drepper <drepper@redhat.com> 2001-04-12 Ulrich Drepper <drepper@redhat.com>
* tst-cancel.c: Disable most tests. Add new test where all
cleanup handlers must run.
* Makefile (tests): Add tst-cancel again.
* cancel.c (__pthread_perform_cleanup): Correct condition for
leaving cleanup loop early.
* sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
all the files which use CURRENT_STACK_FRAME. all the files which use CURRENT_STACK_FRAME.
* sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
__builtin_frame_address. __builtin_frame_address.
* sysdeps/i386/i686/pt-machine.h: Likewise. * sysdeps/i386/i686/pt-machine.h: Likewise.

View File

@ -59,7 +59,7 @@ endif
librt-tests = ex10 ex11 librt-tests = ex10 ex11
tests = ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 $(librt-tests) ex12 ex13 joinrace \ tests = ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 $(librt-tests) ex12 ex13 joinrace \
tststack $(tests-nodelete-$(have-z-nodelete)) ecmutex ex14 ex15 ex16 \ tststack $(tests-nodelete-$(have-z-nodelete)) ecmutex ex14 ex15 ex16 \
ex17 #tst-cancel ex17 tst-cancel
ifeq (yes,$(build-shared)) ifeq (yes,$(build-shared))
tests-nodelete-yes = unload tests-nodelete-yes = unload

View File

@ -197,7 +197,8 @@ void __pthread_perform_cleanup(char *currentframe)
last = c; last = c;
c = c->__prev; c = c->__prev;
if (! FRAME_LEFT (last, c))
if (FRAME_LEFT (last, c))
break; break;
} }

View File

@ -64,23 +64,32 @@ cleanupok (void *arg)
} }
static void *
t3 (void *arg)
{
pthread_cleanup_push (cleanupok, (void *) (long int) 4);
inner ((int) (long int) arg);
pthread_exit (NULL);
pthread_cleanup_pop (0);
}
static void static void
innerok (int a) innerok (int a)
{ {
pthread_cleanup_push (cleanup, (void *) (long int) a); pthread_cleanup_push (cleanupok, (void *) (long int) a);
if (a) pthread_exit (NULL);
return;
pthread_cleanup_pop (0); pthread_cleanup_pop (0);
} }
static void * static void *
t3 (void *arg) t4 (void *arg)
{ {
pthread_cleanup_push (cleanupok, (void *) (long int) 4); pthread_cleanup_push (cleanupok, (void *) (long int) 6);
innerok ((int) (long int) arg); innerok ((int) (long int) arg);
pthread_exit (NULL);
pthread_cleanup_pop (0); pthread_cleanup_pop (0);
return NULL;
} }
@ -90,14 +99,14 @@ main (int argc, char *argv[])
pthread_t td; pthread_t td;
int err; int err;
char *tmp; char *tmp;
const char *path; const char *prefix;
const char template[] = "thtstXXXXXX"; const char template[] = "thtstXXXXXX";
struct stat64 st; struct stat64 st;
int result = 0; int result = 0;
path = argc > 1 ? argv[1] : ""; prefix = argc > 1 ? argv[1] : "";
tmp = (char *) alloca (strlen (path) + sizeof template); tmp = (char *) alloca (strlen (prefix) + sizeof template);
strcpy (stpcpy (tmp, path), template); strcpy (stpcpy (tmp, prefix), template);
fd = mkstemp (tmp); fd = mkstemp (tmp);
if (fd == -1) if (fd == -1)
@ -114,6 +123,7 @@ main (int argc, char *argv[])
exit (1); exit (1);
} }
#ifdef NOT_YET
err = pthread_create (&td, NULL, t1, NULL); err = pthread_create (&td, NULL, t1, NULL);
if (err != 0) if (err != 0)
{ {
@ -155,6 +165,21 @@ main (int argc, char *argv[])
printf ("cannot join thread: %s\n", strerror (err)); printf ("cannot join thread: %s\n", strerror (err));
exit (1); exit (1);
} }
#endif
err = pthread_create (&td, NULL, t4, (void *) 7);
if (err != 0)
{
printf ("cannot create thread t3: %s\n", strerror (err));
exit (1);
}
err = pthread_join (td, NULL);
if (err != 0)
{
printf ("cannot join thread: %s\n", strerror (err));
exit (1);
}
if (fstat64 (fd, &st) < 0) if (fstat64 (fd, &st) < 0)
{ {
@ -177,7 +202,8 @@ main (int argc, char *argv[])
result = 1; result = 1;
} }
if (cleanupokcnt != 1) // if (cleanupokcnt != 3) will be three once t3 runs
if (cleanupokcnt != 2)
{ {
printf ("cleanupokcnt = %d\n", cleanupokcnt); printf ("cleanupokcnt = %d\n", cleanupokcnt);
result = 1; result = 1;