2015-01-02 16:28:19 +00:00
|
|
|
/* Copyright (C) 2002-2015 Free Software Foundation, Inc.
|
2003-01-02 11:01:30 +00:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
License along with the GNU C Library; if not, see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
2003-01-02 11:01:30 +00:00
|
|
|
|
2005-04-15 22:19:39 +00:00
|
|
|
#include <errno.h>
|
2003-01-02 11:01:30 +00:00
|
|
|
#include "pthreadP.h"
|
|
|
|
#include <shlib-compat.h>
|
|
|
|
|
|
|
|
|
|
|
|
#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2)
|
|
|
|
int
|
2003-01-03 01:35:14 +00:00
|
|
|
__pthread_cond_init_2_0 (cond, cond_attr)
|
2003-01-03 19:13:49 +00:00
|
|
|
pthread_cond_2_0_t *cond;
|
2003-01-02 11:01:30 +00:00
|
|
|
const pthread_condattr_t *cond_attr;
|
|
|
|
{
|
2005-04-15 22:19:39 +00:00
|
|
|
struct pthread_condattr *icond_attr = (struct pthread_condattr *) cond_attr;
|
2003-01-02 11:01:30 +00:00
|
|
|
|
|
|
|
/* 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. */
|
2003-01-03 19:13:49 +00:00
|
|
|
cond->cond = NULL;
|
2003-01-02 11:01:30 +00:00
|
|
|
|
2005-04-15 22:19:39 +00:00
|
|
|
/* 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;
|
|
|
|
|
2003-01-02 11:01:30 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2003-01-03 01:35:14 +00:00
|
|
|
compat_symbol (libpthread, __pthread_cond_init_2_0, pthread_cond_init,
|
2003-01-02 11:01:30 +00:00
|
|
|
GLIBC_2_0);
|
|
|
|
#endif
|