Define XTABS to TAB3 on alpha to match Linux 4.16.
[glibc.git] / sysdeps / htl / pthreadP.h
blob6c9aa6cb759eab074c6a2fca49faa4f9d61b8c86
1 /* Declarations of internal pthread functions used by libc. Hurd version.
2 Copyright (C) 2016-2018 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library 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 GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #ifndef _PTHREADP_H
20 #define _PTHREADP_H 1
22 #include <pthread.h>
24 /* These represent the interface used by glibc itself. */
26 extern pthread_t __pthread_self (void);
27 extern int __pthread_kill (pthread_t threadid, int signo);
28 extern struct __pthread **__pthread_threads;
30 extern int _pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr);
31 extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
32 extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
34 extern int __pthread_cond_broadcast (pthread_cond_t *cond);
36 typedef struct __cthread *__cthread_t;
37 typedef int __cthread_key_t;
38 typedef void * (*__cthread_fn_t)(void *__arg);
40 __cthread_t __cthread_fork (__cthread_fn_t, void *);
41 int __pthread_create (pthread_t *newthread,
42 const pthread_attr_t *attr,
43 void *(*start_routine) (void *), void *arg);
45 void __cthread_detach (__cthread_t);
46 int __pthread_detach (pthread_t __threadp);
47 void __pthread_exit (void *value) __attribute__ ((__noreturn__));
48 int __cthread_keycreate (__cthread_key_t *);
49 int __cthread_getspecific (__cthread_key_t, void **);
50 int __cthread_setspecific (__cthread_key_t, void *);
51 int __pthread_key_create (pthread_key_t *key, void (*destr) (void *));
52 void *__pthread_getspecific (pthread_key_t key);
53 int __pthread_setspecific (pthread_key_t key, const void *value);
55 int __pthread_setcancelstate (int state, int *oldstate);
57 int __pthread_getattr_np (pthread_t, pthread_attr_t *);
58 int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr,
59 void **__restrict __stackaddr);
60 int __pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr);
61 int __pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr,
62 size_t *__restrict __stacksize);
63 int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize);
64 int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
65 size_t __stacksize);
66 int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *);
67 struct __pthread_cancelation_handler **___pthread_get_cleanup_stack (void);
69 #if IS_IN (libpthread)
70 hidden_proto (__pthread_key_create)
71 hidden_proto (_pthread_mutex_init)
72 #endif
74 #endif /* pthreadP.h */