aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-02-17 10:22:52 +0000
committerUlrich Drepper <drepper@redhat.com>2003-02-17 10:22:52 +0000
commit5430d926c54d552794e2ef626b37b7f8bc1ec68e (patch)
tree8f07e18afee8bdebefc1f9863888c52f8c992ebc /nptl/tst-basic1.c
parentUpdate. (diff)
downloadglibc-5430d926c54d552794e2ef626b37b7f8bc1ec68e.tar.gz
glibc-5430d926c54d552794e2ef626b37b7f8bc1ec68e.tar.bz2
glibc-5430d926c54d552794e2ef626b37b7f8bc1ec68e.zip
Update.
2003-02-17 Ulrich Drepper <drepper@redhat.com> * Makefile (tests): Add tst-basic6. * tst-basic6.c: New file. * tst-basic1.c: Add test for process ID. * Makefile (tests): Add tst-cancel10. * tst-cancel10.c: New file. * Makefile (tests): Add tst-signal4. * tst-signal4.c: New file. * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use __sigismember instead of sigismember. Add __builtin_expect.
Diffstat (limited to 'nptl/tst-basic1.c')
-rw-r--r--nptl/tst-basic1.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/nptl/tst-basic1.c b/nptl/tst-basic1.c
index 36ae767db0..8bb736ec6f 100644
--- a/nptl/tst-basic1.c
+++ b/nptl/tst-basic1.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -20,10 +20,20 @@
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
+#include <sys/types.h>
-static void *tf (void *a)
+static pid_t pid;
+
+static void *
+tf (void *a)
{
+ if (getpid () != pid)
+ {
+ write (2, "pid mismatch\n", 13);
+ _exit (1);
+ }
+
return a;
}
@@ -31,6 +41,8 @@ static void *tf (void *a)
int
do_test (void)
{
+ pid = getpid ();
+
#define N 2
pthread_t t[N];
int i;