This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Update on freeze status of glibc 2.18?
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: Torvald Riegel <triegel at redhat dot com>, Carlos O'Donell <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, Ryan Arnold <rsa at us dot ibm dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Siddhesh Poyarekar <siddhesh at redhat dot com>
- Date: Thu, 20 Jun 2013 14:04:23 -0700 (PDT)
- Subject: Re: Update on freeze status of glibc 2.18?
- References: <51B66222 dot 1040300 at redhat dot com> <20130614224427 dot 4B2532C077 at topped-with-meat dot com> <51BF3CF8 dot 1010901 at redhat dot com> <1371494971 dot 16968 dot 21574 dot camel at triegel dot csb> <20130617193649 dot 7B5872C08D at topped-with-meat dot com> <1371503900 dot 16968 dot 21902 dot camel at triegel dot csb> <20130619224234 dot 5AC132C10E at topped-with-meat dot com> <1371733830 dot 964 dot 1089 dot camel at triegel dot csb> <20130620140934 dot GZ6123 at two dot firstfloor dot org> <1371743530 dot 964 dot 1602 dot camel at triegel dot csb> <20130620205512 dot GD6123 at two dot firstfloor dot org>
> pthread_mutex_t foo = PTHREAD_MUTEX_INITIALIZER;
>
> or
>
> pthread_mutex_t foo;
> pthread_mutex_init(&foo, NULL);
Precisely what POSIX specifies is that these are exactly equivalent to:
pthread_mutex_t mutex;
pthread_mutexattr_t attr;
pthread_mutexattr_init (&attr);
pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_DEFAULT);
pthread_mutex_init (&mutex, &attr);