]>
git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/mach/hurd/htl/pt-mutexattr-setprotocol.c
1 /* pthread_mutexattr_setprotocol. Hurd version.
2 Copyright (C) 2016-2018 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License
7 as published by the Free Software Foundation; either
8 version 2 of the license, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with this program; if not, see
17 <http://www.gnu.org/licenses/>.
23 #include <pt-internal.h>
28 pthread_mutexattr_setprotocol (pthread_mutexattr_t
*attrp
, int proto
)
31 return proto
== PTHREAD_PRIO_NONE
? 0 :
32 proto
!= PTHREAD_PRIO_INHERIT
&&
33 proto
!= PTHREAD_PRIO_PROTECT
? EINVAL
: ENOTSUP
;