aboutsummaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-10-16 01:37:51 +0000
committerRoland McGrath <roland@gnu.org>1995-10-16 01:37:51 +0000
commit8f5ca04bc7fd53741d80117df992995ace8f6d2d (patch)
treee39c13fc198b22ec55647259a8080051988e8c69 /hurd
parent5d82cf5c55f56ae10d3b0a205d1fcc7de1cf56a0 (diff)
downloadglibc-8f5ca04bc7fd53741d80117df992995ace8f6d2d.zip
glibc-8f5ca04bc7fd53741d80117df992995ace8f6d2d.tar.gz
glibc-8f5ca04bc7fd53741d80117df992995ace8f6d2d.tar.bz2
Sat Oct 14 02:52:36 1995 Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
* malloc/malloc.c (_malloc_internal): Performance fix. Move if statement out of loop. * stdio/_itoa.c, stdio/_itoa.h: Complete rewrite. Much faster implementation using GMP functions. Contributed by Torbjorn Granlund and Ulrich Drepper. * stdio/test_rdwr.c: Include <errno.h>. * sysdeps/i386/i586/Implies: New file. New highly optimized string functions for i[345]86. * sysdeps/i386/memchr.S, sysdeps/i386/memcmp.S: New files. * sysdeps/i386/stpcpy.S, sysdeps/i386/stpncpy.S: New files. * sysdeps/i386/strchr.S, sysdeps/i386/strcspn.S: New files. * sysdeps/i386/strpbrk.S, sysdeps/i386/strrchr.S: New files. * sysdeps/i386/strspn.S, sysdeps/i386/i486/strcat.S: New files. * sysdeps/i386/i486/strlen.S, sysdeps/i386/i586/strchr.S: New files. * sysdeps/i386/i586/strlen.S: New file. * sysdeps/i386/memchr.c: Removed. There is now an assembler version. * sysdeps/i386/i586/memcopy.h (WORD_COPY_BWD): Parameters did not correspond to used values. * sysdeps/unix/sysv/linux/nfs/nfs.h: New file. Simply a wrapper around a kernel header file. * sysdeps/unix/sysv/linux/Dist: Add it. * sysdeps/unix/sysv/linux/Makefile [$(subdir)=sunrpc] (headers): Likewise. * sysdeps/unix/sysv/linux/local_lim.h: Rewrite. Instead of defining ourself we use a kernel header file. * sysdeps/unix/sysv/linux/i386/sysdep.h (DO_CALL): Optimize system call handler for i586. * sysdeps/unix/sysv/linux/sys/param.h: Add copyright and clean up. Sat Oct 14 02:52:36 1995 Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de> * malloc/malloc.c (_malloc_internal): Performance fix. Move if statement out of loop. * stdio/_itoa.c, stdio/_itoa.h: Complete rewrite. Much faster implementation using GMP functions. Contributed by Torbjorn Granlund and Ulrich Drepper. * stdio/test_rdwr.c: Include <errno.h>. * sysdeps/i386/i586/Implies: New file. New highly optimized string functions for i[345]86. * sysdeps/i386/memchr.S, sysdeps/i386/memcmp.S: New files. * sysdeps/i386/stpcpy.S, sysdeps/i386/stpncpy.S: New files. * sysdeps/i386/strchr.S, sysdeps/i386/strcspn.S: New files. * sysdeps/i386/strpbrk.S, sysdeps/i386/strrchr.S: New files. * sysdeps/i386/strspn.S, sysdeps/i386/i486/strcat.S: New files. * sysdeps/i386/i486/strlen.S, sysdeps/i386/i586/strchr.S: New files. * sysdeps/i386/i586/strlen.S: New file. * sysdeps/i386/memchr.c: Removed. There is now an assembler version. * sysdeps/i386/i586/memcopy.h (WORD_COPY_BWD): Parameters did not correspond to used values. * sysdeps/unix/sysv/linux/nfs/nfs.h: New file. Simply a wrapper around a kernel header file. * sysdeps/unix/sysv/linux/Dist: Add it. * sysdeps/unix/sysv/linux/Makefile [$(subdir)=sunrpc] (headers): Likewise. * sysdeps/unix/sysv/linux/local_lim.h: Rewrite. Instead of defining ourself we use a kernel header file. * sysdeps/unix/sysv/linux/i386/sysdep.h (DO_CALL): Optimize system call handler for i586. * sysdeps/unix/sysv/linux/sys/param.h: Add copyright and clean up.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/Makefile4
-rw-r--r--hurd/hurd.h69
-rw-r--r--hurd/hurdinit.c6
3 files changed, 22 insertions, 57 deletions
diff --git a/hurd/Makefile b/hurd/Makefile
index 582f37b..53b7348 100644
--- a/hurd/Makefile
+++ b/hurd/Makefile
@@ -26,7 +26,7 @@ include ../Makeconfig
headers = hurd.h $(interface-headers) \
$(addprefix hurd/,fd.h id.h port.h signal.h userlink.h \
- resource.h threadvar.h)
+ resource.h threadvar.h lookup.h)
distribute := hurdstartup.h hurdfault.h intr-rpc.defs STATUS
@@ -44,7 +44,7 @@ routines = hurdstartup hurdinit \
setauth \
pid2task task2pid \
getuids setuids getumask fchroot \
- hurdsock hurdauth invoke-trans \
+ hurdsock hurdauth \
privports \
msgportdemux \
fopenport \
diff --git a/hurd/hurd.h b/hurd/hurd.h
index acad15b..17b5c45 100644
--- a/hurd/hurd.h
+++ b/hurd/hurd.h
@@ -77,11 +77,16 @@ extern struct hurd_port *_hurd_ports;
extern unsigned int _hurd_nports;
extern volatile mode_t _hurd_umask;
-/* Shorthand macro for referencing _hurd_ports (see <hurd/port.h>). */
+/* Shorthand macro for internal library code referencing _hurd_ports (see
+ <hurd/port.h>). */
#define __USEPORT(which, expr) \
HURD_PORT_USE (&_hurd_ports[INIT_PORT_##which], (expr))
+/* Function version of __USEPORT: calls OPERATE with a send right. */
+
+extern error_t _hurd_ports_use (int which, error_t (*operate) (mach_port_t));
+
/* Base address and size of the initial stack set up by the exec server.
If using cthreads, this stack is deallocated in startup.
@@ -150,52 +155,6 @@ extern int setcttyid (mach_port_t);
extern int __setauth (auth_t), setauth (auth_t);
-/* Split FILE into a directory and a name within the directory. Look up a
- port for the directory and store it in *DIR; store in *NAME a pointer
- into FILE where the name within directory begins. The directory lookup
- uses CRDIR for the root directory and CWDIR for the current directory.
- Returns zero on success or an error code. */
-
-extern error_t __hurd_file_name_split (file_t crdir, file_t cwdir,
- const char *file,
- file_t *dir, char **name);
-extern error_t hurd_file_name_split (file_t crdir, file_t cwdir,
- const char *file,
- file_t *dir, char **name);
-
-/* Open a port to FILE with the given FLAGS and MODE (see <fcntl.h>).
- The file lookup uses CRDIR for the root directory and CWDIR for the
- current directory. If successful, returns zero and store the port
- to FILE in *PORT; otherwise returns an error code. */
-
-extern error_t __hurd_file_name_lookup (file_t crdir, file_t cwdir,
- const char *file,
- int flags, mode_t mode,
- file_t *port);
-extern error_t hurd_file_name_lookup (file_t crdir, file_t cwdir,
- const char *filename,
- int flags, mode_t mode,
- file_t *port);
-
-/* Process the values returned by `dir_lookup' et al, and loop doing
- `dir_lookup' calls until one returns FS_RETRY_NONE. CRDIR is the
- root directory used for things like symlinks to absolute file names; the
- other arguments should be those just passed to and/or returned from
- `dir_lookup', `fsys_getroot', or `file_invoke_translator'. This
- function consumes the reference in *RESULT even if it returns an error. */
-
-extern error_t __hurd_file_name_lookup_retry (file_t crdir,
- enum retry_type doretry,
- char retryname[1024],
- int flags, mode_t mode,
- file_t *result);
-extern error_t hurd_file_name_lookup_retry (file_t crdir,
- enum retry_type doretry,
- char retryname[1024],
- int flags, mode_t mode,
- file_t *result);
-
-
/* Split FILE into a directory and a name within the directory. The
directory lookup uses the current root and working directory. If
successful, stores in *NAME a pointer into FILE where the name
@@ -213,15 +172,15 @@ extern file_t file_name_split (const char *file, char **name);
extern file_t __file_name_lookup (const char *file, int flags, mode_t mode);
extern file_t file_name_lookup (const char *file, int flags, mode_t mode);
-/* Invoke any translator set on the node FILE represents, and return in
- *TRANSLATED a port to the translated node. FLAGS are as for
- `dir_lookup' et al, but the returned port will not necessarily have
- any more access rights than FILE does. */
+/* Open a port to FILE with the given FLAGS and MODE (see <fcntl.h>). The
+ file lookup uses the current root directory, but uses STARTDIR as the
+ "working directory" for file relative names. Returns a port to the file
+ if successful; otherwise sets `errno' and returns MACH_PORT_NULL. */
-extern error_t __hurd_invoke_translator (file_t file, int flags,
- file_t *translated);
-extern error_t hurd_invoke_translator (file_t file, int flags,
- file_t *translated);
+extern file_t __file_name_lookup_under (file_t startdir, const char *file,
+ int flags, mode_t mode);
+extern file_t file_name_lookup_under (file_t startdir, const char *file,
+ int flags, mode_t mode);
/* Open a file descriptor on a port. FLAGS are as for `open'; flags
diff --git a/hurd/hurdinit.c b/hurd/hurdinit.c
index af89211..409d2d1 100644
--- a/hurd/hurdinit.c
+++ b/hurd/hurdinit.c
@@ -31,6 +31,12 @@ struct hurd_port *_hurd_ports;
unsigned int _hurd_nports;
mode_t _hurd_umask;
+error_t
+_hurd_ports_use (int which, error_t (*operate) (mach_port_t))
+{
+ return HURD_PORT_USE (&_hurd_ports[which], (*operate) (port));
+}
+
void _hurd_proc_init (char **argv);
DEFINE_HOOK (_hurd_subinit, (void));