about summary refs log tree commit diff
path: root/nptl/pthread_condattr_setpshared.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_condattr_setpshared.c')
-rw-r--r--nptl/pthread_condattr_setpshared.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nptl/pthread_condattr_setpshared.c b/nptl/pthread_condattr_setpshared.c
index 518c1c791e..f47afccef0 100644
--- a/nptl/pthread_condattr_setpshared.c
+++ b/nptl/pthread_condattr_setpshared.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.
 
@@ -24,7 +24,9 @@ pthread_condattr_setpshared (attr, pshared)
      pthread_condattr_t *attr;
      int pshared;
 {
-  ((struct pthread_condattr *) attr)->pshared = pshared;
+  int *valuep = &((struct pthread_condattr *) attr)->value;
+
+  *valuep = (*valuep & ~1) | (pshared != 0);
 
   return 0;
 }