]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
1999-06-25 Roland McGrath <roland@baalperazim.frob.com>
authorRoland McGrath <roland@gnu.org>
Fri, 25 Jun 1999 14:48:20 +0000 (14:48 +0000)
committerRoland McGrath <roland@gnu.org>
Fri, 25 Jun 1999 14:48:20 +0000 (14:48 +0000)
* hurd.h, hurd/hurd/fd.h, hurd/hurd/port.h, hurd/hurd/signal.h,
hurd/hurd/threadvar.h, hurd/hurd/userlink.h: Instead of
_EXTERN_INLINE, use a macro specific to each file,
_HURD_FD_H_EXTERN_INLINE and the like.
* hurd/Makefile (inline-headers): New variable.
(routines): Remove hurdinline.  Add $(inlines).
(inlines): New variable.
($(inlines:%=$(objpfx)%.c)): New static pattern rule to generate them.
(generated): Append those here.
* hurd/hurdinline.c: File removed.

hurd/hurd/fd.h
hurd/hurd/port.h
hurd/hurd/signal.h
hurd/hurd/threadvar.h
hurd/hurd/userlink.h

index aa48f21acf98adac8b24a76dc63b225610087421..0c424b3c939109794cc71d515053df7a748f10fe 100644 (file)
@@ -1,5 +1,5 @@
 /* File descriptors.
-   Copyright (C) 1993,94,95,96,97,98 Free Software Foundation, Inc.
+   Copyright (C) 1993,94,95,96,97,98, 99 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -49,15 +49,15 @@ extern struct mutex _hurd_dtable_lock; /* Locks those two variables.  */
 #include <hurd/signal.h>
 #include <lock-intern.h>
 
-#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
+#ifndef _HURD_FD_H_EXTERN_INLINE
+#define _HURD_FD_H_EXTERN_INLINE extern __inline
 #endif
 
 /* Returns the descriptor cell for FD.  If FD is invalid or unused, return
    NULL.  The cell is unlocked; when ready to use it, lock it and check for
    it being unused.  */
 
-_EXTERN_INLINE struct hurd_fd *
+_HURD_FD_H_EXTERN_INLINE struct hurd_fd *
 _hurd_fd_get (int fd)
 {
   struct hurd_fd *descriptor;
@@ -134,7 +134,7 @@ _hurd_fd_get (int fd)
 /* Check if ERR should generate a signal.
    Returns the signal to take, or zero if none.  */
 
-_EXTERN_INLINE error_t
+_HURD_FD_H_EXTERN_INLINE error_t
 _hurd_fd_error_signal (error_t err)
 {
   switch (err)
@@ -155,7 +155,7 @@ _hurd_fd_error_signal (error_t err)
    always use this function to handle errors from RPCs made on file
    descriptor ports.  Some errors are translated into signals.  */
 
-_EXTERN_INLINE error_t
+_HURD_FD_H_EXTERN_INLINE error_t
 _hurd_fd_error (int fd, error_t err)
 {
   int signo = _hurd_fd_error_signal (err);
@@ -171,7 +171,7 @@ _hurd_fd_error (int fd, error_t err)
 /* Handle error code ERR from an RPC on file descriptor FD's port.
    Set `errno' to the appropriate error code, and always return -1.  */
 
-_EXTERN_INLINE int
+_HURD_FD_H_EXTERN_INLINE int
 __hurd_dfail (int fd, error_t err)
 {
   errno = _hurd_fd_error (fd, err);
index d58c45fb9792bb0ba1776194799503318b496fa3..1117687155ee538ed0abe95b5c3c2ed986b85f32 100644 (file)
@@ -1,5 +1,5 @@
 /* Lightweight user references for ports.
-   Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994, 1995, 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -54,14 +54,14 @@ struct hurd_port
      __result; })
 
 
-#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
+#ifndef _HURD_PORT_H_EXTERN_INLINE
+#define _HURD_PORT_H_EXTERN_INLINE extern __inline
 #endif
 
 
 /* Initialize *PORT to INIT.  */
 
-_EXTERN_INLINE void
+_HURD_PORT_H_EXTERN_INLINE void
 _hurd_port_init (struct hurd_port *port, mach_port_t init)
 {
   __spin_lock_init (&port->lock);
@@ -76,7 +76,7 @@ extern void _hurd_port_cleanup (void *, jmp_buf, int);
 /* Get a reference to *PORT, which is locked.
    Pass return value and LINK to _hurd_port_free when done.  */
 
-_EXTERN_INLINE mach_port_t
+_HURD_PORT_H_EXTERN_INLINE mach_port_t
 _hurd_port_locked_get (struct hurd_port *port,
                       struct hurd_userlink *link)
 {
@@ -94,7 +94,7 @@ _hurd_port_locked_get (struct hurd_port *port,
 
 /* Same, but locks PORT first.  */
 
-_EXTERN_INLINE mach_port_t
+_HURD_PORT_H_EXTERN_INLINE mach_port_t
 _hurd_port_get (struct hurd_port *port,
                struct hurd_userlink *link)
 {
@@ -109,7 +109,7 @@ _hurd_port_get (struct hurd_port *port,
 
 /* Free a reference gotten with `USED_PORT = _hurd_port_get (PORT, LINK);' */
 
-_EXTERN_INLINE void
+_HURD_PORT_H_EXTERN_INLINE void
 _hurd_port_free (struct hurd_port *port,
                 struct hurd_userlink *link,
                 mach_port_t used_port)
@@ -133,7 +133,7 @@ _hurd_port_free (struct hurd_port *port,
 /* Set *PORT's port to NEWPORT.  NEWPORT's reference is consumed by PORT->port.
    PORT->lock is locked.  */
 
-_EXTERN_INLINE void
+_HURD_PORT_H_EXTERN_INLINE void
 _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport)
 {
   mach_port_t old;
@@ -146,7 +146,7 @@ _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport)
 
 /* Same, but locks PORT first.  */
 
-_EXTERN_INLINE void
+_HURD_PORT_H_EXTERN_INLINE void
 _hurd_port_set (struct hurd_port *port, mach_port_t newport)
 {
   HURD_CRITICAL_BEGIN;
index 30579631113f47a1645e95e317c6c55f0db8aa9e..cb1b312aee71a22fc3641b74aa12247a9023fd15 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementing POSIX.1 signals under the Hurd.
-   Copyright (C) 1993, 94, 95, 96, 98 Free Software Foundation, Inc.
+   Copyright (C) 1993, 94, 95, 96, 98, 99 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -124,7 +124,11 @@ extern struct hurd_sigstate *_hurd_self_sigstate (void)
        by different threads.  */
      __attribute__ ((__const__));
 
-_EXTERN_INLINE struct hurd_sigstate *
+#ifndef _HURD_SIGNAL_H_EXTERN_INLINE
+#define _HURD_SIGNAL_H_EXTERN_INLINE extern __inline
+#endif
+
+_HURD_SIGNAL_H_EXTERN_INLINE struct hurd_sigstate *
 _hurd_self_sigstate (void)
 {
   struct hurd_sigstate **location =
@@ -159,7 +163,7 @@ extern int _hurd_core_limit;
    interrupted lest the signal handler try to take the same lock and
    deadlock result.  */
 
-_EXTERN_INLINE void *
+_HURD_SIGNAL_H_EXTERN_INLINE void *
 _hurd_critical_section_lock (void)
 {
   struct hurd_sigstate **location =
@@ -185,7 +189,7 @@ _hurd_critical_section_lock (void)
   return ss;
 }
 
-_EXTERN_INLINE void
+_HURD_SIGNAL_H_EXTERN_INLINE void
 _hurd_critical_section_unlock (void *our_lock)
 {
   if (our_lock == NULL)
index 55cb5af3e822504794332f3d81e444f7d946af0c..34820273fa54000a0ef2b59b5cdde5bacdbba3fa 100644 (file)
@@ -1,5 +1,5 @@
 /* Internal per-thread variables for the Hurd.
-   Copyright (C) 1994, 95, 97, 98 Free Software Foundation, Inc.
+   Copyright (C) 1994, 95, 97, 98, 99 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -66,14 +66,14 @@ enum __hurd_threadvar_index
   };
 
 
-#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
+#ifndef _HURD_THREADVAR_H_EXTERN_INLINE
+#define _HURD_THREADVAR_H_EXTERN_INLINE extern __inline
 #endif
 
 /* Return the location of the value for the per-thread variable with index
    INDEX used by the thread whose stack pointer is SP.  */
 
-_EXTERN_INLINE unsigned long int *
+_HURD_THREADVAR_H_EXTERN_INLINE unsigned long int *
 __hurd_threadvar_location_from_sp (enum __hurd_threadvar_index __index,
                                   void *__sp)
 {
@@ -97,7 +97,7 @@ __hurd_threadvar_location (enum __hurd_threadvar_index __index)
        the same stack frame by different threads.  */
      __attribute__ ((__const__));
 
-_EXTERN_INLINE unsigned long int *
+_HURD_THREADVAR_H_EXTERN_INLINE unsigned long int *
 __hurd_threadvar_location (enum __hurd_threadvar_index __index)
 {
   return __hurd_threadvar_location_from_sp (__index,
@@ -106,7 +106,7 @@ __hurd_threadvar_location (enum __hurd_threadvar_index __index)
 
 /* Return the current thread's location for `errno'.
    The syntax of this function allows redeclarations like `int errno'.  */
-_EXTERN_INLINE int *
+_HURD_THREADVAR_H_EXTERN_INLINE int *
 __hurd_errno_location (void)
 {
   return (int *) __hurd_threadvar_location (_HURD_THREADVAR_ERRNO);
index 95efb89326edd845fff0768b9cee4f1743a6f82d..1ba8259ff51e10cf2e69a4d766215bd113b6b3f9 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for chains recording users of a resource; `struct hurd_userlink'.
-   Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -70,14 +70,14 @@ struct hurd_userlink
   };
 
 
-#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
+#ifndef _HURD_USERLINK_H_EXTERN_INLINE
+#define _HURD_USERLINK_H_EXTERN_INLINE extern __inline
 #endif
 
 
 /* Attach LINK to the chain of users at *CHAINP.  */
 
-_EXTERN_INLINE void
+_HURD_USERLINK_H_EXTERN_INLINE void
 _hurd_userlink_link (struct hurd_userlink **chainp,
                     struct hurd_userlink *link)
 {
@@ -102,7 +102,7 @@ _hurd_userlink_link (struct hurd_userlink **chainp,
 /* Detach LINK from its chain.  Returns nonzero iff this was the
    last user of the resource and it should be deallocated.  */
 
-_EXTERN_INLINE int
+_HURD_USERLINK_H_EXTERN_INLINE int
 _hurd_userlink_unlink (struct hurd_userlink *link)
 {
   /* We should deallocate the resource used if this chain has been detached
@@ -132,7 +132,7 @@ _hurd_userlink_unlink (struct hurd_userlink *link)
    value is zero, someone is still using the resource and they will
    deallocate it when they are finished.  */
 
-_EXTERN_INLINE int
+_HURD_USERLINK_H_EXTERN_INLINE int
 _hurd_userlink_clear (struct hurd_userlink **chainp)
 {
   if (*chainp == NULL)