diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-02-17 10:22:52 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-02-17 10:22:52 +0000 |
commit | 5430d926c54d552794e2ef626b37b7f8bc1ec68e (patch) | |
tree | 8f07e18afee8bdebefc1f9863888c52f8c992ebc /nptl/tst-basic1.c | |
parent | 179ff175dff6afdb1f2a12f8c18fa48b29bbee6a (diff) | |
download | glibc-5430d926c54d552794e2ef626b37b7f8bc1ec68e.tar.gz glibc-5430d926c54d552794e2ef626b37b7f8bc1ec68e.tar.xz 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.c | 16 |
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; |