aboutsummaryrefslogtreecommitdiff
path: root/nptl/tst-cond4.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-02-14 08:49:07 +0000
committerUlrich Drepper <drepper@redhat.com>2003-02-14 08:49:07 +0000
commit700bf7af9f98174f33ac177332bcbcd644055474 (patch)
treefaf706c17e3ebf7a6598920cd75d261e8f6dfec5 /nptl/tst-cond4.c
parentdac0f7723437aa52232eb98500be1608b32fc657 (diff)
downloadglibc-700bf7af9f98174f33ac177332bcbcd644055474.zip
glibc-700bf7af9f98174f33ac177332bcbcd644055474.tar.gz
glibc-700bf7af9f98174f33ac177332bcbcd644055474.tar.bz2
Update.
2003-02-14 Ulrich Drepper <drepper@redhat.com> * Makefile (tests): Add tst-join4. * tst-join4.c: New file. 2003-02-13 Ulrich Drepper <drepper@redhat.com> * tst-cond4.c (main): Add test of pthread_attr_getpshared.
Diffstat (limited to 'nptl/tst-cond4.c')
-rw-r--r--nptl/tst-cond4.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/nptl/tst-cond4.c b/nptl/tst-cond4.c
index ffc83c7..6b57fbc 100644
--- a/nptl/tst-cond4.c
+++ b/nptl/tst-cond4.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.
@@ -140,12 +140,36 @@ main (void)
exit (1);
}
+ if (pthread_condattr_getpshared (&ca, &p) != 0)
+ {
+ puts ("1st condattr_getpshared failed");
+ exit (1);
+ }
+
+ if (p != PTHREAD_PROCESS_PRIVATE)
+ {
+ puts ("default value for pshared in condattr wrong");
+ exit (1);
+ }
+
if (pthread_condattr_setpshared (&ca, PTHREAD_PROCESS_SHARED) != 0)
{
puts ("condattr_setpshared failed");
exit (1);
}
+ if (pthread_condattr_getpshared (&ca, &p) != 0)
+ {
+ puts ("2nd condattr_getpshared failed");
+ exit (1);
+ }
+
+ if (p != PTHREAD_PROCESS_SHARED)
+ {
+ puts ("pshared condattr still not set");
+ exit (1);
+ }
+
if (pthread_cond_init (cond, &ca) != 0)
{
puts ("cond_init failed");