From: Roland McGrath Date: Fri, 25 Jun 1999 14:48:20 +0000 (+0000) Subject: 1999-06-25 Roland McGrath X-Git-Tag: cvs/glibc_2-1-2~349 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f827f92a52e0bde076d4266aa25fae0cd070867;p=thirdparty%2Fglibc.git 1999-06-25 Roland McGrath * 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. --- diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h index aa48f21acf9..0c424b3c939 100644 --- a/hurd/hurd/fd.h +++ b/hurd/hurd/fd.h @@ -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 #include -#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); diff --git a/hurd/hurd/port.h b/hurd/hurd/port.h index d58c45fb979..1117687155e 100644 --- a/hurd/hurd/port.h +++ b/hurd/hurd/port.h @@ -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; diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h index 30579631113..cb1b312aee7 100644 --- a/hurd/hurd/signal.h +++ b/hurd/hurd/signal.h @@ -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) diff --git a/hurd/hurd/threadvar.h b/hurd/hurd/threadvar.h index 55cb5af3e82..34820273fa5 100644 --- a/hurd/hurd/threadvar.h +++ b/hurd/hurd/threadvar.h @@ -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); diff --git a/hurd/hurd/userlink.h b/hurd/hurd/userlink.h index 95efb89326e..1ba8259ff51 100644 --- a/hurd/hurd/userlink.h +++ b/hurd/hurd/userlink.h @@ -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)