~ubuntu-branches/ubuntu/precise/eglibc/precise

« back to all changes in this revision

Viewing changes to debian/patches/hurd-i386/tg-extern_inline.diff

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2011-10-04 17:48:26 UTC
  • mfrom: (216.1.23 oneiric)
  • Revision ID: package-import@ubuntu.com-20111004174826-2cyb9ewn3ucymlsx
Tags: 2.13-20ubuntu5
libc6-dev: Don't break the current {gnat,gcj}-4.4-base versons. LP: #853688.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From: Thomas Schwinge <thomas@schwinge.name>
2
 
Subject: [PATCH] extern_inline
3
 
 
4
 
Fix some ``extern inline'' stuff.
5
 
 
6
 
glibc-2.8/debian/patches/hurd-i386/submitted-extern_inline.diff 3057
7
 
 
8
 
Probably all done by Samuel Thibault.
9
 
 
10
 
---
11
 
 hurd/hurd.h                             |    4 ++++
12
 
 hurd/hurd/fd.h                          |   20 ++++++++++++++++++++
13
 
 hurd/hurd/port.h                        |   31 +++++++++++++++++++++++++++++++
14
 
 hurd/hurd/signal.h                      |   16 +++++++++++++---
15
 
 hurd/hurd/threadvar.h                   |    5 +++++
16
 
 hurd/hurd/userlink.h                    |   14 ++++++++++++++
17
 
 mach/lock-intern.h                      |   20 ++++++++++++++++++++
18
 
 mach/mach/mig_support.h                 |    3 +++
19
 
 mach/spin-lock.c                        |    1 +
20
 
 sysdeps/generic/machine-lock.h          |   12 ++++++++++++
21
 
 sysdeps/generic/machine-sp.h            |    4 ++++
22
 
 sysdeps/mach/i386/machine-lock.h        |   12 ++++++++++++
23
 
 sysdeps/mach/powerpc/machine-lock.h     |   12 ++++++++++++
24
 
 sysdeps/mach/powerpc/machine-sp.h       |    4 ++++
25
 
 14 files changed, 155 insertions(+), 3 deletions(-)
26
 
 
27
 
diff --git a/hurd/hurd.h b/hurd/hurd.h
28
 
index 642ea43..2ce1da0 100644
29
 
--- a/hurd/hurd.h
30
 
+++ b/hurd/hurd.h
31
 
@@ -48,6 +48,9 @@
32
 
 #define _HURD_H_EXTERN_INLINE __extern_inline
33
 
 #endif
34
 
 
35
 
+int __hurd_fail (error_t err);
36
 
+
37
 
+#ifdef __USE_EXTERN_INLINES
38
 
 _HURD_H_EXTERN_INLINE int
39
 
 __hurd_fail (error_t err)
40
 
 {
41
 
@@ -77,6 +80,7 @@ __hurd_fail (error_t err)
42
 
   errno = err;
43
 
   return -1;
44
 
 }
45
 
+#endif
46
 
 
47
 
 /* Basic ports and info, initialized by startup.  */
48
 
 
49
 
diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h
50
 
index 2473476..034e7ca 100644
51
 
--- a/hurd/hurd/fd.h
52
 
+++ b/hurd/hurd/fd.h
53
 
@@ -60,6 +60,9 @@ extern struct mutex _hurd_dtable_lock; /* Locks those two variables.  */
54
 
    NULL.  The cell is unlocked; when ready to use it, lock it and check for
55
 
    it being unused.  */
56
 
 
57
 
+struct hurd_fd *_hurd_fd_get (int fd);
58
 
+
59
 
+#ifdef __USE_EXTERN_INLINES
60
 
 _HURD_FD_H_EXTERN_INLINE struct hurd_fd *
61
 
 _hurd_fd_get (int fd)
62
 
 {
63
 
@@ -90,6 +93,7 @@ _hurd_fd_get (int fd)
64
 
 
65
 
   return descriptor;
66
 
 }
67
 
+#endif
68
 
 
69
 
 
70
 
 /* Evaluate EXPR with the variable `descriptor' bound to a pointer to the
71
 
@@ -137,6 +141,9 @@ _hurd_fd_get (int fd)
72
 
 /* Check if ERR should generate a signal.
73
 
    Returns the signal to take, or zero if none.  */
74
 
 
75
 
+int _hurd_fd_error_signal (error_t err);
76
 
+
77
 
+#ifdef __USE_EXTERN_INLINES
78
 
 _HURD_FD_H_EXTERN_INLINE int
79
 
 _hurd_fd_error_signal (error_t err)
80
 
 {
81
 
@@ -153,11 +160,15 @@ _hurd_fd_error_signal (error_t err)
82
 
       return 0;
83
 
     }
84
 
 }
85
 
+#endif
86
 
 
87
 
 /* Handle an error from an RPC on a file descriptor's port.  You should
88
 
    always use this function to handle errors from RPCs made on file
89
 
    descriptor ports.  Some errors are translated into signals.  */
90
 
 
91
 
+error_t _hurd_fd_error (int fd, error_t err);
92
 
+
93
 
+#ifdef __USE_EXTERN_INLINES
94
 
 _HURD_FD_H_EXTERN_INLINE error_t
95
 
 _hurd_fd_error (int fd, error_t err)
96
 
 {
97
 
@@ -170,20 +181,28 @@ _hurd_fd_error (int fd, error_t err)
98
 
     }
99
 
   return err;
100
 
 }
101
 
+#endif
102
 
 
103
 
 /* Handle error code ERR from an RPC on file descriptor FD's port.
104
 
    Set `errno' to the appropriate error code, and always return -1.  */
105
 
 
106
 
+int __hurd_dfail (int fd, error_t err);
107
 
+
108
 
+#ifdef __USE_EXTERN_INLINES
109
 
 _HURD_FD_H_EXTERN_INLINE int
110
 
 __hurd_dfail (int fd, error_t err)
111
 
 {
112
 
   errno = _hurd_fd_error (fd, err);
113
 
   return -1;
114
 
 }
115
 
+#endif
116
 
 
117
 
 /* Likewise, but do not raise SIGPIPE on EPIPE if flags contain
118
 
    MSG_NOSIGNAL.  */
119
 
 
120
 
+int __hurd_sockfail (int fd, int flags, error_t err);
121
 
+
122
 
+#ifdef __USE_EXTERN_INLINES
123
 
 _HURD_FD_H_EXTERN_INLINE int
124
 
 __hurd_sockfail (int fd, int flags, error_t err)
125
 
 {
126
 
@@ -192,6 +211,7 @@ __hurd_sockfail (int fd, int flags, error_t err)
127
 
   errno = err;
128
 
   return -1;
129
 
 }
130
 
+#endif
131
 
 
132
 
 /* Set up *FD to have PORT its server port, doing appropriate ctty magic.
133
 
    Does no locking or unlocking.  */
134
 
diff --git a/hurd/hurd/port.h b/hurd/hurd/port.h
135
 
index a1803c3..30769c9 100644
136
 
--- a/hurd/hurd/port.h
137
 
+++ b/hurd/hurd/port.h
138
 
@@ -62,6 +62,9 @@ struct hurd_port
139
 
 
140
 
 /* Initialize *PORT to INIT.  */
141
 
 
142
 
+void _hurd_port_init (struct hurd_port *port, mach_port_t init);
143
 
+
144
 
+#ifdef __USE_EXTERN_INLINES
145
 
 _HURD_PORT_H_EXTERN_INLINE void
146
 
 _hurd_port_init (struct hurd_port *port, mach_port_t init)
147
 
 {
148
 
@@ -69,6 +72,7 @@ _hurd_port_init (struct hurd_port *port, mach_port_t init)
149
 
   port->users = NULL;
150
 
   port->port = init;
151
 
 }
152
 
+#endif
153
 
 
154
 
 
155
 
 /* Cleanup function for non-local exits.  */
156
 
@@ -77,6 +81,11 @@ extern void _hurd_port_cleanup (void *, jmp_buf, int);
157
 
 /* Get a reference to *PORT, which is locked.
158
 
    Pass return value and LINK to _hurd_port_free when done.  */
159
 
 
160
 
+mach_port_t
161
 
+_hurd_port_locked_get (struct hurd_port *port,
162
 
+                      struct hurd_userlink *link);
163
 
+
164
 
+#ifdef __USE_EXTERN_INLINES
165
 
 _HURD_PORT_H_EXTERN_INLINE mach_port_t
166
 
 _hurd_port_locked_get (struct hurd_port *port,
167
 
                       struct hurd_userlink *link)
168
 
@@ -92,9 +101,15 @@ _hurd_port_locked_get (struct hurd_port *port,
169
 
   __spin_unlock (&port->lock);
170
 
   return result;
171
 
 }
172
 
+#endif
173
 
 
174
 
 /* Same, but locks PORT first.  */
175
 
 
176
 
+mach_port_t
177
 
+_hurd_port_get (struct hurd_port *port,
178
 
+               struct hurd_userlink *link);
179
 
+
180
 
+#ifdef __USE_EXTERN_INLINES
181
 
 _HURD_PORT_H_EXTERN_INLINE mach_port_t
182
 
 _hurd_port_get (struct hurd_port *port,
183
 
                struct hurd_userlink *link)
184
 
@@ -106,10 +121,17 @@ _hurd_port_get (struct hurd_port *port,
185
 
   HURD_CRITICAL_END;
186
 
   return result;
187
 
 }
188
 
+#endif
189
 
 
190
 
 
191
 
 /* Free a reference gotten with `USED_PORT = _hurd_port_get (PORT, LINK);' */
192
 
 
193
 
+void
194
 
+_hurd_port_free (struct hurd_port *port,
195
 
+                struct hurd_userlink *link,
196
 
+                mach_port_t used_port);
197
 
+
198
 
+#ifdef __USE_EXTERN_INLINES
199
 
 _HURD_PORT_H_EXTERN_INLINE void
200
 
 _hurd_port_free (struct hurd_port *port,
201
 
                 struct hurd_userlink *link,
202
 
@@ -129,11 +151,15 @@ _hurd_port_free (struct hurd_port *port,
203
 
   if (dealloc)
204
 
     __mach_port_deallocate (__mach_task_self (), used_port);
205
 
 }
206
 
+#endif
207
 
 
208
 
 
209
 
 /* Set *PORT's port to NEWPORT.  NEWPORT's reference is consumed by PORT->port.
210
 
    PORT->lock is locked.  */
211
 
 
212
 
+void _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport);
213
 
+
214
 
+#ifdef __USE_EXTERN_INLINES
215
 
 _HURD_PORT_H_EXTERN_INLINE void
216
 
 _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport)
217
 
 {
218
 
@@ -144,9 +170,13 @@ _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport)
219
 
   if (old != MACH_PORT_NULL)
220
 
     __mach_port_deallocate (__mach_task_self (), old);
221
 
 }
222
 
+#endif
223
 
 
224
 
 /* Same, but locks PORT first.  */
225
 
 
226
 
+void _hurd_port_set (struct hurd_port *port, mach_port_t newport);
227
 
+
228
 
+#ifdef __USE_EXTERN_INLINES
229
 
 _HURD_PORT_H_EXTERN_INLINE void
230
 
 _hurd_port_set (struct hurd_port *port, mach_port_t newport)
231
 
 {
232
 
@@ -155,6 +185,7 @@ _hurd_port_set (struct hurd_port *port, mach_port_t newport)
233
 
   _hurd_port_locked_set (port, newport);
234
 
   HURD_CRITICAL_END;
235
 
 }
236
 
+#endif
237
 
 
238
 
 
239
 
 #endif /* hurd/port.h */
240
 
diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h
241
 
index 21e30c5..46c1fe1 100644
242
 
--- a/hurd/hurd/signal.h
243
 
+++ b/hurd/hurd/signal.h
244
 
@@ -131,15 +131,17 @@ extern struct hurd_sigstate *_hurd_self_sigstate (void)
245
 
 #define _HURD_SIGNAL_H_EXTERN_INLINE __extern_inline
246
 
 #endif
247
 
 
248
 
+#ifdef __USE_EXTERN_INLINES
249
 
 _HURD_SIGNAL_H_EXTERN_INLINE struct hurd_sigstate *
250
 
 _hurd_self_sigstate (void)
251
 
 {
252
 
-  struct hurd_sigstate **location =
253
 
+  struct hurd_sigstate **location = (struct hurd_sigstate **)
254
 
     (void *) __hurd_threadvar_location (_HURD_THREADVAR_SIGSTATE);
255
 
   if (*location == NULL)
256
 
     *location = _hurd_thread_sigstate (__mach_thread_self ());
257
 
   return *location;
258
 
 }
259
 
+#endif
260
 
 
261
 
 /* Thread listening on our message port; also called the "signal thread".  */
262
 
 
263
 
@@ -166,10 +168,13 @@ extern int _hurd_core_limit;
264
 
    interrupted lest the signal handler try to take the same lock and
265
 
    deadlock result.  */
266
 
 
267
 
+void *_hurd_critical_section_lock (void);
268
 
+
269
 
+#ifdef __USE_EXTERN_INLINES
270
 
 _HURD_SIGNAL_H_EXTERN_INLINE void *
271
 
 _hurd_critical_section_lock (void)
272
 
 {
273
 
-  struct hurd_sigstate **location =
274
 
+  struct hurd_sigstate **location = (struct hurd_sigstate **)
275
 
     (void *) __hurd_threadvar_location (_HURD_THREADVAR_SIGSTATE);
276
 
   struct hurd_sigstate *ss = *location;
277
 
   if (ss == NULL)
278
 
@@ -191,7 +196,11 @@ _hurd_critical_section_lock (void)
279
 
      _hurd_critical_section_unlock to unlock it.  */
280
 
   return ss;
281
 
 }
282
 
+#endif
283
 
 
284
 
+void _hurd_critical_section_unlock (void *our_lock);
285
 
+
286
 
+#ifdef __USE_EXTERN_INLINES
287
 
 _HURD_SIGNAL_H_EXTERN_INLINE void
288
 
 _hurd_critical_section_unlock (void *our_lock)
289
 
 {
290
 
@@ -201,7 +210,7 @@ _hurd_critical_section_unlock (void *our_lock)
291
 
   else
292
 
     {
293
 
       /* It was us who acquired the critical section lock.  Unlock it.  */
294
 
-      struct hurd_sigstate *ss = our_lock;
295
 
+      struct hurd_sigstate *ss = (struct hurd_sigstate *) our_lock;
296
 
       sigset_t pending;
297
 
       __spin_lock (&ss->lock);
298
 
       __spin_unlock (&ss->critical_section_lock);
299
 
@@ -214,6 +223,7 @@ _hurd_critical_section_unlock (void *our_lock)
300
 
        __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ());
301
 
     }
302
 
 }
303
 
+#endif
304
 
 
305
 
 /* Convenient macros for simple uses of critical sections.
306
 
    These two must be used as a pair at the same C scoping level.  */
307
 
diff --git a/hurd/hurd/threadvar.h b/hurd/hurd/threadvar.h
308
 
index a0535f7..dd4a59c 100644
309
 
--- a/hurd/hurd/threadvar.h
310
 
+++ b/hurd/hurd/threadvar.h
311
 
@@ -82,6 +82,8 @@ enum __hurd_threadvar_index
312
 
 
313
 
 extern unsigned long int *__hurd_threadvar_location_from_sp
314
 
   (enum __hurd_threadvar_index __index, void *__sp);
315
 
+
316
 
+#ifdef __USE_EXTERN_INLINES
317
 
 _HURD_THREADVAR_H_EXTERN_INLINE unsigned long int *
318
 
 __hurd_threadvar_location_from_sp (enum __hurd_threadvar_index __index,
319
 
                                   void *__sp)
320
 
@@ -93,6 +95,7 @@ __hurd_threadvar_location_from_sp (enum __hurd_threadvar_index __index,
321
 
           : (unsigned long int *) ((__stack & __hurd_threadvar_stack_mask) +
322
 
                                    __hurd_threadvar_stack_offset))[__index];
323
 
 }
324
 
+#endif
325
 
 
326
 
 #include <machine-sp.h>                /* Define __thread_stack_pointer.  */
327
 
 
328
 
@@ -106,12 +109,14 @@ __hurd_threadvar_location (enum __hurd_threadvar_index __index) __THROW
329
 
        the same stack frame by different threads.  */
330
 
      __attribute__ ((__const__));
331
 
 
332
 
+#ifdef __USE_EXTERN_INLINES
333
 
 _HURD_THREADVAR_H_EXTERN_INLINE unsigned long int *
334
 
 __hurd_threadvar_location (enum __hurd_threadvar_index __index)
335
 
 {
336
 
   return __hurd_threadvar_location_from_sp (__index,
337
 
                                            __thread_stack_pointer ());
338
 
 }
339
 
+#endif
340
 
 
341
 
 
342
 
 #endif /* hurd/threadvar.h */
343
 
diff --git a/hurd/hurd/userlink.h b/hurd/hurd/userlink.h
344
 
index 34457e7..90045a9 100644
345
 
--- a/hurd/hurd/userlink.h
346
 
+++ b/hurd/hurd/userlink.h
347
 
@@ -77,6 +77,11 @@ struct hurd_userlink
348
 
 
349
 
 /* Attach LINK to the chain of users at *CHAINP.  */
350
 
 
351
 
+void
352
 
+_hurd_userlink_link (struct hurd_userlink **chainp,
353
 
+                    struct hurd_userlink *link);
354
 
+
355
 
+#ifdef __USE_EXTERN_INLINES
356
 
 _HURD_USERLINK_H_EXTERN_INLINE void
357
 
 _hurd_userlink_link (struct hurd_userlink **chainp,
358
 
                     struct hurd_userlink *link)
359
 
@@ -97,11 +102,15 @@ _hurd_userlink_link (struct hurd_userlink **chainp,
360
 
   link->thread.prevp = thread_chainp;
361
 
   *thread_chainp = link;
362
 
 }
363
 
+#endif
364
 
 
365
 
 
366
 
 /* Detach LINK from its chain.  Returns nonzero iff this was the
367
 
    last user of the resource and it should be deallocated.  */
368
 
 
369
 
+int _hurd_userlink_unlink (struct hurd_userlink *link);
370
 
+
371
 
+#ifdef __USE_EXTERN_INLINES
372
 
 _HURD_USERLINK_H_EXTERN_INLINE int
373
 
 _hurd_userlink_unlink (struct hurd_userlink *link)
374
 
 {
375
 
@@ -124,6 +133,7 @@ _hurd_userlink_unlink (struct hurd_userlink *link)
376
 
 
377
 
   return dealloc;
378
 
 }
379
 
+#endif
380
 
 
381
 
 
382
 
 /* Clear all users from *CHAINP.  Call this when the resource *CHAINP
383
 
@@ -132,6 +142,9 @@ _hurd_userlink_unlink (struct hurd_userlink *link)
384
 
    value is zero, someone is still using the resource and they will
385
 
    deallocate it when they are finished.  */
386
 
 
387
 
+int _hurd_userlink_clear (struct hurd_userlink **chainp);
388
 
+
389
 
+#ifdef __USE_EXTERN_INLINES
390
 
 _HURD_USERLINK_H_EXTERN_INLINE int
391
 
 _hurd_userlink_clear (struct hurd_userlink **chainp)
392
 
 {
393
 
@@ -144,5 +157,6 @@ _hurd_userlink_clear (struct hurd_userlink **chainp)
394
 
   *chainp = NULL;
395
 
   return 0;
396
 
 }
397
 
+#endif
398
 
 
399
 
 #endif /* hurd/userlink.h */
400
 
diff --git a/mach/lock-intern.h b/mach/lock-intern.h
401
 
index 4aaaedc..a854ddc 100644
402
 
--- a/mach/lock-intern.h
403
 
+++ b/mach/lock-intern.h
404
 
@@ -29,11 +29,15 @@
405
 
 
406
 
 /* Initialize LOCK.  */
407
 
 
408
 
+void __spin_lock_init (__spin_lock_t *__lock);
409
 
+
410
 
+#ifdef __USE_EXTERN_INLINES
411
 
 _EXTERN_INLINE void
412
 
 __spin_lock_init (__spin_lock_t *__lock)
413
 
 {
414
 
   *__lock = __SPIN_LOCK_INITIALIZER;
415
 
 }
416
 
+#endif
417
 
 
418
 
 
419
 
 /* Lock LOCK, blocking if we can't get it.  */
420
 
@@ -41,12 +45,16 @@ extern void __spin_lock_solid (__spin_lock_t *__lock);
421
 
 
422
 
 /* Lock the spin lock LOCK.  */
423
 
 
424
 
+void __spin_lock (__spin_lock_t *__lock);
425
 
+
426
 
+#ifdef __USE_EXTERN_INLINES
427
 
 _EXTERN_INLINE void
428
 
 __spin_lock (__spin_lock_t *__lock)
429
 
 {
430
 
   if (! __spin_try_lock (__lock))
431
 
     __spin_lock_solid (__lock);
432
 
 }
433
 
+#endif
434
 
 
435
 
 /* Name space-clean internal interface to mutex locks.
436
 
 
437
 
@@ -71,27 +79,39 @@ extern void __mutex_unlock_solid (void *__lock);
438
 
 
439
 
 /* Lock the mutex lock LOCK.  */
440
 
 
441
 
+void __mutex_lock (void *__lock);
442
 
+
443
 
+#ifdef __USE_EXTERN_INLINES
444
 
 _EXTERN_INLINE void
445
 
 __mutex_lock (void *__lock)
446
 
 {
447
 
   if (! __spin_try_lock ((__spin_lock_t *) __lock))
448
 
     __mutex_lock_solid (__lock);
449
 
 }
450
 
+#endif
451
 
 
452
 
 /* Unlock the mutex lock LOCK.  */
453
 
 
454
 
+void __mutex_unlock (void *__lock);
455
 
+
456
 
+#ifdef __USE_EXTERN_INLINES
457
 
 _EXTERN_INLINE void
458
 
 __mutex_unlock (void *__lock)
459
 
 {
460
 
   __spin_unlock ((__spin_lock_t *) __lock);
461
 
   __mutex_unlock_solid (__lock);
462
 
 }
463
 
+#endif
464
 
 
465
 
 
466
 
+int __mutex_trylock (void *__lock);
467
 
+
468
 
+#ifdef __USE_EXTERN_INLINES
469
 
 _EXTERN_INLINE int
470
 
 __mutex_trylock (void *__lock)
471
 
 {
472
 
   return __spin_try_lock ((__spin_lock_t *) __lock);
473
 
 }
474
 
+#endif
475
 
 
476
 
 #endif /* lock-intern.h */
477
 
diff --git a/mach/mach/mig_support.h b/mach/mach/mig_support.h
478
 
index f02e8d4..fdd43a6 100644
479
 
--- a/mach/mach/mig_support.h
480
 
+++ b/mach/mach/mig_support.h
481
 
@@ -67,6 +67,8 @@ extern void mig_reply_setup (const mach_msg_header_t *__request,
482
 
 /* Idiocy support function.  */
483
 
 extern vm_size_t mig_strncpy (char *__dst, const char *__src, vm_size_t __len);
484
 
 extern vm_size_t __mig_strncpy (char *__dst, const char *__src, vm_size_t);
485
 
+
486
 
+#ifdef __USE_EXTERN_INLINES
487
 
 __extern_inline vm_size_t
488
 
 __mig_strncpy (char *__dst, const char *__src, vm_size_t __len)
489
 
 {
490
 
@@ -77,6 +79,7 @@ mig_strncpy (char *__dst, const char *__src, vm_size_t __len)
491
 
 {
492
 
   return __mig_strncpy (__dst, __src, __len);
493
 
 }
494
 
+#endif
495
 
 
496
 
 
497
 
 
498
 
diff --git a/mach/spin-lock.c b/mach/spin-lock.c
499
 
index aaebc55..1b1e69c 100644
500
 
--- a/mach/spin-lock.c
501
 
+++ b/mach/spin-lock.c
502
 
@@ -1,3 +1,4 @@
503
 
+#define __USE_EXTERN_INLINES 1
504
 
 #define _EXTERN_INLINE /* Empty to define the real functions.  */
505
 
 #include "spin-lock.h"
506
 
 
507
 
diff --git a/sysdeps/generic/machine-lock.h b/sysdeps/generic/machine-lock.h
508
 
index db9f444..5ecb265 100644
509
 
--- a/sysdeps/generic/machine-lock.h
510
 
+++ b/sysdeps/generic/machine-lock.h
511
 
@@ -35,14 +35,21 @@ typedef volatile int __spin_lock_t;
512
 
 
513
 
 /* Unlock LOCK.  */
514
 
 
515
 
+void __spin_unlock (__spin_lock_t *__lock);
516
 
+
517
 
+#ifdef __USE_EXTERN_INLINES
518
 
 _EXTERN_INLINE void
519
 
 __spin_unlock (__spin_lock_t *__lock)
520
 
 {
521
 
   *__lock = 0;
522
 
 }
523
 
+#endif
524
 
 
525
 
 /* Try to lock LOCK; return nonzero if we locked it, zero if another has.  */
526
 
 
527
 
+int __spin_try_lock (__spin_lock_t *__lock);
528
 
+
529
 
+#ifdef __USE_EXTERN_INLINES
530
 
 _EXTERN_INLINE int
531
 
 __spin_try_lock (__spin_lock_t *__lock)
532
 
 {
533
 
@@ -51,14 +58,19 @@ __spin_try_lock (__spin_lock_t *__lock)
534
 
   *__lock = 1;
535
 
   return 1;
536
 
 }
537
 
+#endif
538
 
 
539
 
 /* Return nonzero if LOCK is locked.  */
540
 
 
541
 
+int __spin_lock_locked (__spin_lock_t *__lock);
542
 
+
543
 
+#ifdef __USE_EXTERN_INLINES
544
 
 _EXTERN_INLINE int
545
 
 __spin_lock_locked (__spin_lock_t *__lock)
546
 
 {
547
 
   return *__lock != 0;
548
 
 }
549
 
+#endif
550
 
 
551
 
 
552
 
 #endif /* machine-lock.h */
553
 
diff --git a/sysdeps/generic/machine-sp.h b/sysdeps/generic/machine-sp.h
554
 
index 25e423e..4769bc5 100644
555
 
--- a/sysdeps/generic/machine-sp.h
556
 
+++ b/sysdeps/generic/machine-sp.h
557
 
@@ -26,11 +26,15 @@
558
 
 #define _EXTERN_INLINE __extern_inline
559
 
 #endif
560
 
 
561
 
+void * __thread_stack_pointer (void);
562
 
+
563
 
+#ifdef __USE_EXTERN_INLINES
564
 
 _EXTERN_INLINE void *
565
 
 __thread_stack_pointer (void)
566
 
 {
567
 
   register void *__sp__ ("{STACK-POINTER}");
568
 
   return __sp__;
569
 
 }
570
 
+#endif
571
 
 
572
 
 #endif /* machine-sp.h */
573
 
diff --git a/sysdeps/mach/i386/machine-lock.h b/sysdeps/mach/i386/machine-lock.h
574
 
index 33602f4..b0700d9 100644
575
 
--- a/sysdeps/mach/i386/machine-lock.h
576
 
+++ b/sysdeps/mach/i386/machine-lock.h
577
 
@@ -35,6 +35,9 @@ typedef __volatile int __spin_lock_t;
578
 
 
579
 
 /* Unlock LOCK.  */
580
 
 
581
 
+void __spin_unlock (__spin_lock_t *__lock);
582
 
+
583
 
+#ifdef __USE_EXTERN_INLINES
584
 
 _EXTERN_INLINE void
585
 
 __spin_unlock (__spin_lock_t *__lock)
586
 
 {
587
 
@@ -43,9 +46,13 @@ __spin_unlock (__spin_lock_t *__lock)
588
 
                       : "=&r" (__unlocked), "=m" (*__lock) : "0" (0)
589
 
                       : "memory");
590
 
 }
591
 
+#endif
592
 
 
593
 
 /* Try to lock LOCK; return nonzero if we locked it, zero if another has.  */
594
 
 
595
 
+int __spin_try_lock (__spin_lock_t *__lock);
596
 
+
597
 
+#ifdef __USE_EXTERN_INLINES
598
 
 _EXTERN_INLINE int
599
 
 __spin_try_lock (__spin_lock_t *__lock)
600
 
 {
601
 
@@ -55,14 +62,19 @@ __spin_try_lock (__spin_lock_t *__lock)
602
 
                      : "memory");
603
 
   return !__locked;
604
 
 }
605
 
+#endif
606
 
 
607
 
 /* Return nonzero if LOCK is locked.  */
608
 
 
609
 
+int __spin_lock_locked (__spin_lock_t *__lock);
610
 
+
611
 
+#ifdef __USE_EXTERN_INLINES
612
 
 _EXTERN_INLINE int
613
 
 __spin_lock_locked (__spin_lock_t *__lock)
614
 
 {
615
 
   return *__lock != 0;
616
 
 }
617
 
+#endif
618
 
 
619
 
 
620
 
 #endif /* machine-lock.h */
621
 
diff --git a/sysdeps/mach/powerpc/machine-lock.h b/sysdeps/mach/powerpc/machine-lock.h
622
 
index 96af221..b0e228b 100644
623
 
--- a/sysdeps/mach/powerpc/machine-lock.h
624
 
+++ b/sysdeps/mach/powerpc/machine-lock.h
625
 
@@ -35,6 +35,9 @@ typedef __volatile long int __spin_lock_t;
626
 
 
627
 
 /* Unlock LOCK.  */
628
 
 
629
 
+void __spin_unlock (__spin_lock_t *__lock);
630
 
+
631
 
+#ifdef __USE_EXTERN_INLINES
632
 
 _EXTERN_INLINE void
633
 
 __spin_unlock (__spin_lock_t *__lock)
634
 
 {
635
 
@@ -45,9 +48,13 @@ __spin_unlock (__spin_lock_t *__lock)
636
 
        bne-    0b\n\
637
 
 " : "=&r" (__locked) : "r" (__lock), "r" (0) : "cr0");
638
 
 }
639
 
+#endif
640
 
 
641
 
 /* Try to lock LOCK; return nonzero if we locked it, zero if another has.  */
642
 
 
643
 
+int __spin_try_lock (register __spin_lock_t *__lock);
644
 
+
645
 
+#ifdef __USE_EXTERN_INLINES
646
 
 _EXTERN_INLINE int
647
 
 __spin_try_lock (register __spin_lock_t *__lock)
648
 
 {
649
 
@@ -59,9 +66,13 @@ __spin_try_lock (register __spin_lock_t *__lock)
650
 
 " : "=&r" (__rtn) : "r" (__lock), "r" (1) : "cr0");
651
 
   return !__rtn;
652
 
 }
653
 
+#endif
654
 
 
655
 
 /* Return nonzero if LOCK is locked.  */
656
 
 
657
 
+int __spin_lock_locked (__spin_lock_t *__lock);
658
 
+
659
 
+#ifdef __USE_EXTERN_INLINES
660
 
 _EXTERN_INLINE int
661
 
 __spin_lock_locked (__spin_lock_t *__lock)
662
 
 {
663
 
@@ -73,6 +84,7 @@ __spin_lock_locked (__spin_lock_t *__lock)
664
 
 " : "=&r" (__rtn) : "r" (__lock) : "cr0");
665
 
   return __rtn;
666
 
 }
667
 
+#endif
668
 
 
669
 
 
670
 
 #endif /* machine-lock.h */
671
 
diff --git a/sysdeps/mach/powerpc/machine-sp.h b/sysdeps/mach/powerpc/machine-sp.h
672
 
index 267707b..5885b2a 100644
673
 
--- a/sysdeps/mach/powerpc/machine-sp.h
674
 
+++ b/sysdeps/mach/powerpc/machine-sp.h
675
 
@@ -31,6 +31,9 @@
676
 
 # endif
677
 
 #endif
678
 
 
679
 
+void * __thread_stack_pointer (void);
680
 
+
681
 
+#ifdef __USE_EXTERN_INLINES
682
 
 _EXTERN_INLINE void *
683
 
 __thread_stack_pointer (void)
684
 
 {
685
 
@@ -38,5 +41,6 @@ __thread_stack_pointer (void)
686
 
   __asm__ ("mr %0, 1" : "=r" (__sp__));
687
 
   return __sp__;
688
 
 }
689
 
+#endif
690
 
 
691
 
 #endif /* machine-sp.h */
692
 
tg: (0234227..) t/extern_inline (depends on: baseline)