This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 5/9] Support setting elision in pthread_mutexattr_settype
- From: Andi Kleen <andi at firstfloor dot org>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: Andi Kleen <andi at firstfloor dot org>, libc-alpha at sourceware dot org, Andi Kleen <ak at linux dot intel dot com>
- Date: Wed, 15 May 2013 04:37:08 +0200
- Subject: Re: [PATCH 5/9] Support setting elision in pthread_mutexattr_settype
- References: <1368225725-14283-1-git-send-email-andi at firstfloor dot org> <1368225725-14283-6-git-send-email-andi at firstfloor dot org> <51924A36 dot 3040202 at redhat dot com>
> > - if (kind < PTHREAD_MUTEX_NORMAL || kind > PTHREAD_MUTEX_ADAPTIVE_NP)
> > + if (mkind < PTHREAD_MUTEX_NORMAL || mkind > PTHREAD_MUTEX_ADAPTIVE_NP)
> > + return EINVAL;
> > + if ((kind & PTHREAD_MUTEX_ELISION_FLAGS_NP) == PTHREAD_MUTEX_ELISION_FLAGS_NP)
> > return EINVAL;
>
> Why is this invalid?
The mask includes two different flags which cannot be set at the same time.
-Andi