source: trunk/third/gcc/libobjc/thr-vxworks.c @ 21199

Revision 21199, 4.0 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21198, which included commits to RCS files with non-trunk default branches.
Line 
1/* GNU Objective C Runtime Thread Implementation
2   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
3   Contributed by Galen C. Hunt (gchunt@cs.rochester.edu)
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under the
8terms of the GNU General Public License as published by the Free Software
9Foundation; either version 2, or (at your option) any later version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
14details.
15
16You should have received a copy of the GNU General Public License along with
17GCC; see the file COPYING.  If not, write to the Free Software
18Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA.  */
20
21/* As a special exception, if you link this library with files compiled with
22   GCC to produce an executable, this does not cause the resulting executable
23   to be covered by the GNU General Public License. This exception does not
24   however invalidate any other reasons why the executable file might be
25   covered by the GNU General Public License.  */
26
27#include <objc/thr.h>
28#include "runtime.h"
29
30/* Thread local storage for a single thread */
31static void *thread_local_storage = NULL;
32
33/* Backend initialization functions */
34
35/* Initialize the threads subsystem. */
36int
37__objc_init_thread_system(void)
38{
39  /* No thread support available */
40  return -1;
41}
42
43/* Close the threads subsystem. */
44int
45__objc_close_thread_system(void)
46{
47  /* No thread support available */
48  return -1;
49}
50
51/* Backend thread functions */
52
53/* Create a new thread of execution. */
54objc_thread_t
55__objc_thread_detach(void (*func)(void *arg), void *arg)
56{
57  /* No thread support available */
58  return NULL;
59}
60
61/* Set the current thread's priority. */
62int
63__objc_thread_set_priority(int priority)
64{
65  /* No thread support available */
66  return -1;
67}
68
69/* Return the current thread's priority. */
70int
71__objc_thread_get_priority(void)
72{
73  return OBJC_THREAD_INTERACTIVE_PRIORITY;
74}
75
76/* Yield our process time to another thread. */
77void
78__objc_thread_yield(void)
79{
80  return;
81}
82
83/* Terminate the current thread. */
84int
85__objc_thread_exit(void)
86{
87  /* No thread support available */
88  /* Should we really exit the program */
89  /* exit(&__objc_thread_exit_status); */
90  return -1;
91}
92
93/* Returns an integer value which uniquely describes a thread. */
94objc_thread_t
95__objc_thread_id(void)
96{
97  /* No thread support, use 1. */
98  return (objc_thread_t)1;
99}
100
101/* Sets the thread's local storage pointer. */
102int
103__objc_thread_set_data(void *value)
104{
105  thread_local_storage = value;
106  return 0;
107}
108
109/* Returns the thread's local storage pointer. */
110void *
111__objc_thread_get_data(void)
112{
113  return thread_local_storage;
114}
115
116/* Backend mutex functions */
117
118/* Allocate a mutex. */
119int
120__objc_mutex_allocate(objc_mutex_t mutex)
121{
122  return 0;
123}
124
125/* Deallocate a mutex. */
126int
127__objc_mutex_deallocate(objc_mutex_t mutex)
128{
129  return 0;
130}
131
132/* Grab a lock on a mutex. */
133int
134__objc_mutex_lock(objc_mutex_t mutex)
135{
136  /* There can only be one thread, so we always get the lock */
137  return 0;
138}
139
140/* Try to grab a lock on a mutex. */
141int
142__objc_mutex_trylock(objc_mutex_t mutex)
143{
144  /* There can only be one thread, so we always get the lock */
145  return 0;
146}
147
148/* Unlock the mutex */
149int
150__objc_mutex_unlock(objc_mutex_t mutex)
151{
152  return 0;
153}
154
155/* Backend condition mutex functions */
156
157/* Allocate a condition. */
158int
159__objc_condition_allocate(objc_condition_t condition)
160{
161  return 0;
162}
163
164/* Deallocate a condition. */
165int
166__objc_condition_deallocate(objc_condition_t condition)
167{
168  return 0;
169}
170
171/* Wait on the condition */
172int
173__objc_condition_wait(objc_condition_t condition, objc_mutex_t mutex)
174{
175  return 0;
176}
177
178/* Wake up all threads waiting on this condition. */
179int
180__objc_condition_broadcast(objc_condition_t condition)
181{
182  return 0;
183}
184
185/* Wake up one thread waiting on this condition. */
186int
187__objc_condition_signal(objc_condition_t condition)
188{
189  return 0;
190}
191
192/* End of File */
Note: See TracBrowser for help on using the repository browser.