Warning: That file was not part of the compilation database. It may have many parsing errors.

1/* Declaration of libc stubs for pthread functions. Hurd version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
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.
9
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.
14
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/>. */
18
19#ifndef _PTHREAD_FUNCTIONS_H
20#define _PTHREAD_FUNCTIONS_H 1
21
22#include <pthread.h>
23
24int __pthread_attr_destroy (pthread_attr_t *);
25int __pthread_attr_init (pthread_attr_t *);
26int __pthread_attr_getdetachstate (const pthread_attr_t *, int *);
27int __pthread_attr_setdetachstate (pthread_attr_t *, int);
28int __pthread_attr_getinheritsched (const pthread_attr_t *, int *);
29int __pthread_attr_setinheritsched (pthread_attr_t *, int);
30int __pthread_attr_getschedparam (const pthread_attr_t *,
31 struct sched_param *);
32int __pthread_attr_setschedparam (pthread_attr_t *,
33 const struct sched_param *);
34int __pthread_attr_getschedpolicy (const pthread_attr_t *, int *);
35int __pthread_attr_setschedpolicy (pthread_attr_t *, int);
36int __pthread_attr_getscope (const pthread_attr_t *, int *);
37int __pthread_attr_setscope (pthread_attr_t *, int);
38int __pthread_condattr_destroy (pthread_condattr_t *);
39int __pthread_condattr_init (pthread_condattr_t *);
40int __pthread_cond_broadcast (pthread_cond_t *);
41int __pthread_cond_destroy (pthread_cond_t *);
42int __pthread_cond_init (pthread_cond_t *,
43 const pthread_condattr_t *);
44int __pthread_cond_signal (pthread_cond_t *);
45int __pthread_cond_wait (pthread_cond_t *, pthread_mutex_t *);
46int __pthread_cond_timedwait (pthread_cond_t *, pthread_mutex_t *,
47 const struct timespec *);
48int __pthread_equal (pthread_t, pthread_t);
49void __pthread_exit (void *);
50int __pthread_getschedparam (pthread_t, int *, struct sched_param *);
51int __pthread_setschedparam (pthread_t, int,
52 const struct sched_param *);
53int _pthread_mutex_destroy (pthread_mutex_t *);
54int _pthread_mutex_init (pthread_mutex_t *,
55 const pthread_mutexattr_t *);
56int __pthread_mutex_lock (pthread_mutex_t *);
57int __pthread_mutex_trylock (pthread_mutex_t *);
58int __pthread_mutex_unlock (pthread_mutex_t *);
59pthread_t __pthread_self (void);
60int __pthread_setcancelstate (int, int *);
61int __pthread_setcanceltype (int, int *);
62struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void);
63int __pthread_once (pthread_once_t *, void (*) (void));
64int __pthread_rwlock_rdlock (pthread_rwlock_t *);
65int __pthread_rwlock_wrlock (pthread_rwlock_t *);
66int __pthread_rwlock_unlock (pthread_rwlock_t *);
67int __pthread_key_create (pthread_key_t *, void (*) (void *));
68void *__pthread_getspecific (pthread_key_t);
69int __pthread_setspecific (pthread_key_t, const void *);
70
71void _cthreads_flockfile (FILE *);
72void _cthreads_funlockfile (FILE *);
73int _cthreads_ftrylockfile (FILE *);
74
75/* Data type shared with libc. The libc uses it to pass on calls to
76 the thread functions. Wine pokes directly into this structure,
77 so if possible avoid breaking it and append new hooks to the end. */
78struct pthread_functions
79{
80 int (*ptr_pthread_attr_destroy) (pthread_attr_t *);
81 int (*ptr_pthread_attr_init) (pthread_attr_t *);
82 int (*ptr_pthread_attr_getdetachstate) (const pthread_attr_t *, int *);
83 int (*ptr_pthread_attr_setdetachstate) (pthread_attr_t *, int);
84 int (*ptr_pthread_attr_getinheritsched) (const pthread_attr_t *, int *);
85 int (*ptr_pthread_attr_setinheritsched) (pthread_attr_t *, int);
86 int (*ptr_pthread_attr_getschedparam) (const pthread_attr_t *,
87 struct sched_param *);
88 int (*ptr_pthread_attr_setschedparam) (pthread_attr_t *,
89 const struct sched_param *);
90 int (*ptr_pthread_attr_getschedpolicy) (const pthread_attr_t *, int *);
91 int (*ptr_pthread_attr_setschedpolicy) (pthread_attr_t *, int);
92 int (*ptr_pthread_attr_getscope) (const pthread_attr_t *, int *);
93 int (*ptr_pthread_attr_setscope) (pthread_attr_t *, int);
94 int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *);
95 int (*ptr_pthread_condattr_init) (pthread_condattr_t *);
96 int (*ptr_pthread_cond_broadcast) (pthread_cond_t *);
97 int (*ptr_pthread_cond_destroy) (pthread_cond_t *);
98 int (*ptr_pthread_cond_init) (pthread_cond_t *,
99 const pthread_condattr_t *);
100 int (*ptr_pthread_cond_signal) (pthread_cond_t *);
101 int (*ptr_pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
102 int (*ptr_pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
103 const struct timespec *);
104 int (*ptr_pthread_equal) (pthread_t, pthread_t);
105 void (*ptr___pthread_exit) (void *);
106 int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *);
107 int (*ptr_pthread_setschedparam) (pthread_t, int,
108 const struct sched_param *);
109 int (*ptr_pthread_mutex_destroy) (pthread_mutex_t *);
110 int (*ptr_pthread_mutex_init) (pthread_mutex_t *,
111 const pthread_mutexattr_t *);
112 int (*ptr_pthread_mutex_lock) (pthread_mutex_t *);
113 int (*ptr_pthread_mutex_trylock) (pthread_mutex_t *);
114 int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *);
115 pthread_t (*ptr_pthread_self) (void);
116 int (*ptr___pthread_setcancelstate) (int, int *);
117 int (*ptr_pthread_setcanceltype) (int, int *);
118 struct __pthread_cancelation_handler **(*ptr___pthread_get_cleanup_stack) (void);
119 int (*ptr_pthread_once) (pthread_once_t *, void (*) (void));
120 int (*ptr_pthread_rwlock_rdlock) (pthread_rwlock_t *);
121 int (*ptr_pthread_rwlock_wrlock) (pthread_rwlock_t *);
122 int (*ptr_pthread_rwlock_unlock) (pthread_rwlock_t *);
123 int (*ptr___pthread_key_create) (pthread_key_t *, void (*) (void *));
124 void *(*ptr___pthread_getspecific) (pthread_key_t);
125 int (*ptr___pthread_setspecific) (pthread_key_t, const void *);
126 void (*ptr__IO_flockfile) (FILE *);
127 void (*ptr__IO_funlockfile) (FILE *);
128 int (*ptr__IO_ftrylockfile) (FILE *);
129};
130
131/* Variable in libc.so. */
132extern struct pthread_functions __libc_pthread_functions attribute_hidden;
133extern int __libc_pthread_functions_init attribute_hidden;
134
135void __libc_pthread_init (const struct pthread_functions *functions);
136
137#define PTHFCT_CALL(fct, params) \
138 __libc_pthread_functions.fct params
139
140#endif /* pthread-functions.h */
141

Warning: That file was not part of the compilation database. It may have many parsing errors.