aboutsummaryrefslogtreecommitdiff
path: root/nptl/tst-basic1.c
diff options
context:
space:
mode:
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 36ae767..8bb736e 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;