/* Posix threads. Hurd version.
Copyright (C) 2000-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
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
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
/*
* POSIX Threads Extension: ??? <pthread.h>
*/
#ifndef _PTHREAD_H
#define _PTHREAD_H 1
#include <features.h>
#include <sys/cdefs.h>
#ifndef __extern_inline
/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
inline semantics, unless -fgnu89-inline is used. */
# if !defined __cplusplus || __GNUC_PREREQ (4,3)
# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
# if __GNUC_PREREQ (4,3)
# define __extern_always_inline \
extern __always_inline __attribute__ ((__gnu_inline__, __artificial__))
# else
# define __extern_always_inline \
extern __always_inline __attribute__ ((__gnu_inline__))
# endif
# else
# define __extern_inline extern __inline
# define __extern_always_inline extern __always_inline
# endif
# endif
#endif
#include <sched.h>
#include <time.h>
__BEGIN_DECLS
#include <bits/pthreadtypes.h>
#include <bits/pthread.h>
/* Possible values for the process shared attribute. */
#define PTHREAD_PROCESS_PRIVATE __PTHREAD_PROCESS_PRIVATE
#define PTHREAD_PROCESS_SHARED __PTHREAD_PROCESS_SHARED
/* Thread attributes. */
/* Possible values for the inheritsched attribute. */
#define PTHREAD_EXPLICIT_SCHED __PTHREAD_EXPLICIT_SCHED
#define PTHREAD_INHERIT_SCHED __PTHREAD_INHERIT_SCHED
/* Possible values for the `contentionscope' attribute. */
#define PTHREAD_SCOPE_SYSTEM __PTHREAD_SCOPE_SYSTEM
#define PTHREAD_SCOPE_PROCESS __PTHREAD_SCOPE_PROCESS
/* Possible values for the `detachstate' attribute. */
#define PTHREAD_CREATE_JOINABLE __PTHREAD_CREATE_JOINABLE
#define PTHREAD_CREATE_DETACHED __PTHREAD_CREATE_DETACHED
#include <bits/types/struct___pthread_attr.h>
/* Initialize the thread attribute object in *ATTR to the default
values. */
extern int pthread_attr_init (pthread_attr_t *__attr) __THROW __nonnull ((1));
/* Destroy the thread attribute object in *ATTR. */
extern int pthread_attr_destroy (pthread_attr_t *__attr)
__THROW __nonnull ((1));
/* Return the value of the inheritsched attribute in *ATTR in
*INHERITSCHED. */
extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict __attr,
int *__restrict __inheritsched)
__THROW __nonnull ((1, 2));
/* Set the value of the inheritsched attribute in *ATTR to
INHERITSCHED. */
extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
int __inheritsched)
__THROW __nonnull ((1));