aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-09-18 13:48:06 +0000
committerUlrich Drepper <drepper@redhat.com>2006-09-18 13:48:06 +0000
commit0466106efce2eedc4bc874280ecadd5cd931281f (patch)
tree533984bed4a58f9d0264ee928a1f64eab009b0d6 /nptl
parent9c316a45840a4277b22d34cbe6d1e221a0d5a00d (diff)
downloadglibc-0466106efce2eedc4bc874280ecadd5cd931281f.tar
glibc-0466106efce2eedc4bc874280ecadd5cd931281f.tar.gz
glibc-0466106efce2eedc4bc874280ecadd5cd931281f.tar.bz2
glibc-0466106efce2eedc4bc874280ecadd5cd931281f.zip
* sysdeps/unix/sysv/linux/sys/ptrace.h (PT_GETEVENTMSG): Fix pasto.
* sysdeps/unix/sysv/linux/s390/sys/ptrace.h (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define. * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Likewise. * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Likewise. * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG): Likewise. (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Change to the arch independent values. * sysdeps/unix/sysv/linux/sys/ptrace.h (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define. * sysdeps/unix/sysv/linux/ptrace.c (ptrace): Check PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO and PTRACE_SETSIGINFO.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog6
-rw-r--r--nptl/tst-cancel2.c8
-rw-r--r--nptl/tst-kill4.c21
3 files changed, 27 insertions, 8 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 656dfe3f3e..94618d9099 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-18 Jakub Jelinek <jakub@redhat.com>
+
+ * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
+
+ * tst-cancel2.c (tf): Loop as long as something was written.
+
2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
diff --git a/nptl/tst-cancel2.c b/nptl/tst-cancel2.c
index 6d80f8ae5e..529b5d4050 100644
--- a/nptl/tst-cancel2.c
+++ b/nptl/tst-cancel2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -33,11 +33,7 @@ tf (void *arg)
write blocks. */
char buf[100000];
- if (write (fd[1], buf, sizeof (buf)) == sizeof (buf))
- {
- puts ("write succeeded");
- return (void *) 1l;
- }
+ while (write (fd[1], buf, sizeof (buf)) > 0);
return (void *) 42l;
}
diff --git a/nptl/tst-kill4.c b/nptl/tst-kill4.c
index 4e7ff5eaf4..a1b97e7b26 100644
--- a/nptl/tst-kill4.c
+++ b/nptl/tst-kill4.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -35,13 +35,30 @@ tf (void *a)
int
do_test (void)
{
+ pthread_attr_t at;
+ if (pthread_attr_init (&at) != 0)
+ {
+ puts ("attr_create failed");
+ exit (1);
+ }
+
+ /* Limit thread stack size, because if it is too large, pthread_join
+ will free it immediately rather than put it into stack cache. */
+ if (pthread_attr_setstacksize (&at, 2 * 1024 * 1024) != 0)
+ {
+ puts ("setstacksize failed");
+ exit (1);
+ }
+
pthread_t th;
- if (pthread_create (&th, NULL, tf, NULL) != 0)
+ if (pthread_create (&th, &at, tf, NULL) != 0)
{
puts ("create failed");
exit (1);
}
+ pthread_attr_destroy (&at);
+
if (pthread_join (th, NULL) != 0)
{
puts ("join failed");