]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgcc/config/alpha/gthr-posix.c
2012-03-12 Paolo Carlini <paolo.carlini@oracle.com>
[thirdparty/gcc.git] / libgcc / config / alpha / gthr-posix.c
CommitLineData
ecd34a08 1/* POSIX threads dummy routines for systems without weak definitions. */
2/* Compile this one with gcc. */
4dc4ff49 3/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2011
4 Free Software Foundation, Inc.
ecd34a08 5
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify it under
9the terms of the GNU General Public License as published by the Free
6bc9506f 10Software Foundation; either version 3, or (at your option) any later
ecd34a08 11version.
12
13GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14WARRANTY; without even the implied warranty of MERCHANTABILITY or
15FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16for more details.
17
6bc9506f 18Under Section 7 of GPL version 3, you are granted additional
19permissions described in the GCC Runtime Library Exception, version
203.1, as published by the Free Software Foundation.
ecd34a08 21
6bc9506f 22You should have received a copy of the GNU General Public License and
23a copy of the GCC Runtime Library Exception along with this program;
24see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25<http://www.gnu.org/licenses/>. */
ecd34a08 26
27#include "tconfig.h"
28#include "tm.h"
022a2799 29#include "libgcc_tm.h"
7f385964 30# define __gthrw_pragma(pragma) _Pragma (#pragma)
ecd34a08 31/* Define so we provide weak definitions of functions used by libobjc only. */
32#define _LIBOBJC_WEAK
33#include "gthr.h"
34
35int
36pthread_once (pthread_once_t *once ATTRIBUTE_UNUSED,
37 void (*func) (void) ATTRIBUTE_UNUSED)
38{
39 return -1;
40}
41
42int
43pthread_key_create (pthread_key_t *key ATTRIBUTE_UNUSED,
44 void (*dtor) (void *) ATTRIBUTE_UNUSED)
45{
46 return -1;
47}
48
49int
50pthread_key_delete (pthread_key_t key ATTRIBUTE_UNUSED)
51{
52 return 0;
53}
54
55void *
56pthread_getspecific (pthread_key_t key ATTRIBUTE_UNUSED)
57{
58 return 0;
59}
60
61int
62pthread_setspecific (pthread_key_t key ATTRIBUTE_UNUSED,
63 const void *ptr ATTRIBUTE_UNUSED)
64{
65 return 0;
66}
67
68int
69pthread_create (pthread_t *thread ATTRIBUTE_UNUSED,
70 const pthread_attr_t *attr ATTRIBUTE_UNUSED,
71 void *(*start_routine) (void *) ATTRIBUTE_UNUSED,
72 void *arg ATTRIBUTE_UNUSED)
73{
74 return 0;
75}
76
48e1416a 77int
78pthread_join (pthread_t thread ATTRIBUTE_UNUSED,
3fbf11ef 79 void **value_ptr ATTRIBUTE_UNUSED)
80{
81 return 0;
82}
83
84void
85pthread_exit (void *value_ptr ATTRIBUTE_UNUSED)
86{
87}
88
48e1416a 89int
3fbf11ef 90pthread_detach (pthread_t thread ATTRIBUTE_UNUSED)
91{
92 return 0;
93}
94
c22cf4d8 95int
7f385964 96pthread_cancel (pthread_t thread ATTRIBUTE_UNUSED)
c22cf4d8 97{
98 return 0;
99}
100
ecd34a08 101int
102pthread_mutex_lock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED)
103{
104 return 0;
105}
106
107int
108pthread_mutex_trylock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED)
109{
110 return 0;
111}
112
3fbf11ef 113#ifdef _POSIX_TIMEOUTS
189a0b8c 114#if _POSIX_TIMEOUTS >= 0
3fbf11ef 115int
116pthread_mutex_timedlock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED,
117 const struct timespec *abs_timeout ATTRIBUTE_UNUSED)
118{
119 return 0;
120}
189a0b8c 121#endif
3fbf11ef 122#endif /* _POSIX_TIMEOUTS */
123
ecd34a08 124int
125pthread_mutex_unlock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED)
126{
127 return 0;
128}
129
c22cf4d8 130int
131pthread_mutexattr_init (pthread_mutexattr_t *attr ATTRIBUTE_UNUSED)
132{
133 return 0;
134}
135
136int
137pthread_mutexattr_settype (pthread_mutexattr_t *attr ATTRIBUTE_UNUSED,
138 int type ATTRIBUTE_UNUSED)
139{
140 return 0;
141}
142
143int
144pthread_mutexattr_destroy (pthread_mutexattr_t *attr ATTRIBUTE_UNUSED)
145{
146 return 0;
147}
148
ecd34a08 149int
150pthread_cond_broadcast (pthread_cond_t *cond ATTRIBUTE_UNUSED)
151{
152 return 0;
153}
154
155int
156pthread_cond_destroy (pthread_cond_t *cond ATTRIBUTE_UNUSED)
157{
158 return 0;
159}
160
161int
162pthread_cond_init (pthread_cond_t *cond ATTRIBUTE_UNUSED,
163 const pthread_condattr_t *attr ATTRIBUTE_UNUSED)
164{
165 return 0;
166}
167
168int
169pthread_cond_signal (pthread_cond_t *cond ATTRIBUTE_UNUSED)
170{
171 return 0;
172}
173
174int
175pthread_cond_wait (pthread_cond_t *cond ATTRIBUTE_UNUSED,
176 pthread_mutex_t *mutex ATTRIBUTE_UNUSED)
177{
178 return 0;
179}
180
3fbf11ef 181int
4dc4ff49 182pthread_cond_timedwait (pthread_cond_t *cond ATTRIBUTE_UNUSED,
48e1416a 183 pthread_mutex_t *mutex ATTRIBUTE_UNUSED,
3fbf11ef 184 const struct timespec *abstime ATTRIBUTE_UNUSED)
ecd34a08 185{
3fbf11ef 186 return 0;
ecd34a08 187}
188
189int
190pthread_mutex_init (pthread_mutex_t *mutex ATTRIBUTE_UNUSED,
191 const pthread_mutexattr_t *attr ATTRIBUTE_UNUSED)
192{
193 return 0;
194}
195
196int
197pthread_mutex_destroy (pthread_mutex_t *mutex ATTRIBUTE_UNUSED)
198{
199 return 0;
200}
201
202pthread_t
203pthread_self (void)
204{
205 return (pthread_t) 0;
206}
3fbf11ef 207
a55f666d 208#ifdef _POSIX_PRIORITY_SCHEDULING
ecd34a08 209#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
210int
211sched_get_priority_max (int policy ATTRIBUTE_UNUSED)
212{
213 return 0;
214}
215
216int
217sched_get_priority_min (int policy ATTRIBUTE_UNUSED)
218{
219 return 0;
220}
221#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
a55f666d 222#endif /* _POSIX_PRIORITY_SCHEDULING */
ecd34a08 223
224int
225sched_yield (void)
226{
227 return 0;
228}
229
230int
231pthread_attr_destroy (pthread_attr_t *attr ATTRIBUTE_UNUSED)
232{
233 return 0;
234}
235
236int
237pthread_attr_init (pthread_attr_t *attr ATTRIBUTE_UNUSED)
238{
239 return 0;
240}
241
242int
243pthread_attr_setdetachstate (pthread_attr_t *attr ATTRIBUTE_UNUSED,
244 int detachstate ATTRIBUTE_UNUSED)
245{
246 return 0;
247}
248
249#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
250int
251pthread_getschedparam (pthread_t thread ATTRIBUTE_UNUSED,
252 int *policy ATTRIBUTE_UNUSED,
253 struct sched_param *param ATTRIBUTE_UNUSED)
254{
255 return 0;
256}
257
258int
259pthread_setschedparam (pthread_t thread ATTRIBUTE_UNUSED,
260 int policy ATTRIBUTE_UNUSED,
261 const struct sched_param *param ATTRIBUTE_UNUSED)
262{
263 return 0;
264}
265#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
266