diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-04-27 11:31:41 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-04-27 11:31:41 +0000 |
commit | 35278cc7d7fe81e01bb092e76b775c169e7e85f6 (patch) | |
tree | 6ec42ab959998df5c0182183807ee2b9efc4cc91 /nptl/old_pthread_cond_init.c | |
parent | 536db0d3b5efac042be3bf1d6f99f9c418f76255 (diff) | |
download | glibc-35278cc7d7fe81e01bb092e76b775c169e7e85f6.tar glibc-35278cc7d7fe81e01bb092e76b775c169e7e85f6.tar.gz glibc-35278cc7d7fe81e01bb092e76b775c169e7e85f6.tar.bz2 glibc-35278cc7d7fe81e01bb092e76b775c169e7e85f6.zip |
Updated to fedora-glibc-20050427T1043
Diffstat (limited to 'nptl/old_pthread_cond_init.c')
-rw-r--r-- | nptl/old_pthread_cond_init.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/nptl/old_pthread_cond_init.c b/nptl/old_pthread_cond_init.c index 21bc856a02..47e68b000d 100644 --- a/nptl/old_pthread_cond_init.c +++ b/nptl/old_pthread_cond_init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <errno.h> #include "pthreadP.h" #include <shlib-compat.h> @@ -27,15 +28,18 @@ __pthread_cond_init_2_0 (cond, cond_attr) pthread_cond_2_0_t *cond; const pthread_condattr_t *cond_attr; { - /* Note that we don't need the COND-ATTR. It contains only the - PSHARED flag which is unimportant here since conditional - variables are always usable in multiple processes. */ + struct pthread_condattr *icond_attr = (struct pthread_condattr *) cond_attr; /* The type of the first argument is actually that of the old, too small pthread_cond_t. We use only the first word of it, as a pointer. */ cond->cond = NULL; + /* We can't support PSHARED condvars in the old pthread_cond_* + functions and neither clocks other than CLOCK_REALTIME. */ + if (icond_attr != NULL && icond_attr->value) + return EINVAL; + return 0; } compat_symbol (libpthread, __pthread_cond_init_2_0, pthread_cond_init, |