]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/mach/hurd/htl/pt-mutexattr-setprotocol.c
hurd: Add hurd thread library
[thirdparty/glibc.git] / 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.
4
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.
9
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.
14
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/>.
18 */
19
20 #include <pthread.h>
21 #include <stdlib.h>
22 #include <assert.h>
23 #include <pt-internal.h>
24 #include "pt-mutex.h"
25 #include <hurdlock.h>
26
27 int
28 pthread_mutexattr_setprotocol (pthread_mutexattr_t *attrp, int proto)
29 {
30 (void) attrp;
31 return proto == PTHREAD_PRIO_NONE ? 0 :
32 proto != PTHREAD_PRIO_INHERIT &&
33 proto != PTHREAD_PRIO_PROTECT ? EINVAL : ENOTSUP;
34 }