mirror of git://sourceware.org/git/glibc.git
* old_pthread_cond_init.c: Include <errno.h>.
(__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is process shared or uses clock other than CLOCK_REALTIME. * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
This commit is contained in:
parent
21cee297ec
commit
4a035b9da9
|
@ -1,3 +1,10 @@
|
||||||
|
2005-04-15 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* old_pthread_cond_init.c: Include <errno.h>.
|
||||||
|
(__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
|
||||||
|
process shared or uses clock other than CLOCK_REALTIME.
|
||||||
|
* pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
|
||||||
|
|
||||||
2005-04-13 David S. Miller <davem@davemloft.net>
|
2005-04-13 David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
* sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
|
* sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
|
||||||
|
|
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
02111-1307 USA. */
|
02111-1307 USA. */
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include "pthreadP.h"
|
#include "pthreadP.h"
|
||||||
#include <shlib-compat.h>
|
#include <shlib-compat.h>
|
||||||
|
|
||||||
|
@ -27,15 +28,18 @@ __pthread_cond_init_2_0 (cond, cond_attr)
|
||||||
pthread_cond_2_0_t *cond;
|
pthread_cond_2_0_t *cond;
|
||||||
const pthread_condattr_t *cond_attr;
|
const pthread_condattr_t *cond_attr;
|
||||||
{
|
{
|
||||||
/* Note that we don't need the COND-ATTR. It contains only the
|
struct pthread_condattr *icond_attr = (struct pthread_condattr *) cond_attr;
|
||||||
PSHARED flag which is unimportant here since conditional
|
|
||||||
variables are always usable in multiple processes. */
|
|
||||||
|
|
||||||
/* The type of the first argument is actually that of the old, too
|
/* 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
|
small pthread_cond_t. We use only the first word of it, as a
|
||||||
pointer. */
|
pointer. */
|
||||||
cond->cond = NULL;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
compat_symbol (libpthread, __pthread_cond_init_2_0, pthread_cond_init,
|
compat_symbol (libpthread, __pthread_cond_init_2_0, pthread_cond_init,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||||
|
|
||||||
|
@ -26,8 +26,6 @@ __pthread_cond_init (cond, cond_attr)
|
||||||
pthread_cond_t *cond;
|
pthread_cond_t *cond;
|
||||||
const pthread_condattr_t *cond_attr;
|
const pthread_condattr_t *cond_attr;
|
||||||
{
|
{
|
||||||
/* Note that we don't need the PSHARED information from COND-ATTR.
|
|
||||||
Conditional variables are always usable in multiple processes. */
|
|
||||||
struct pthread_condattr *icond_attr = (struct pthread_condattr *) cond_attr;
|
struct pthread_condattr *icond_attr = (struct pthread_condattr *) cond_attr;
|
||||||
|
|
||||||
cond->__data.__lock = LLL_MUTEX_LOCK_INITIALIZER;
|
cond->__data.__lock = LLL_MUTEX_LOCK_INITIALIZER;
|
||||||
|
|
Loading…
Reference in New Issue