-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#include "pthreadP.h"
int
-pthread_condattr_getpshared (attr, pshared)
- const pthread_condattr_t *attr;
- int *pshared;
+pthread_condattr_getpshared (const pthread_condattr_t *attr, int *pshared)
{
- *pshared = ((const struct pthread_condattr *) attr)->value & 1;
+ *pshared = (((const struct pthread_condattr *) attr)->value & 1
+ ? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE);
return 0;
}