diff options
author | Roland McGrath <roland@gnu.org> | 1998-12-30 06:50:40 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1998-12-30 06:50:40 +0000 |
commit | 426351562d55a06e490fad6a87cd7d0106280ab6 (patch) | |
tree | 68b935f19834e5fd0b2addcb7e00bfa3a4f9e4dc /libdiskfs/init-init.c | |
parent | 05361f6e96c9b7abaca44e16cf38e9f8bc0475e2 (diff) |
1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
Use a struct hurd_port for the cached exec server port,
so it is properly reference-counted and locked.
* boot-start.c (diskfs_exec): Variable removed.
(diskfs_start_bootstrap): Make it a local here.
Install that port in _diskfs_exec_portcell.
(diskfs_S_fsys_init): Use _diskfs_exec_portcell instead
of diskfs_exec.
* init-init.c (_diskfs_exec_portcell): New variable.
(diskfs_init_diskfs): Initialize it.
* priv.h: Declare it.
* diskfs.h (diskfs_exec, diskfs_exec_ctl): Remove decls.
* file-exec.c (diskfs_S_file_exec): Use _diskfs_exec_portcell instead
of diskfs_exec.
Diffstat (limited to 'libdiskfs/init-init.c')
-rw-r--r-- | libdiskfs/init-init.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libdiskfs/init-init.c b/libdiskfs/init-init.c index f60b53b6..7853be26 100644 --- a/libdiskfs/init-init.c +++ b/libdiskfs/init-init.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation + Copyright (C) 1994, 95, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -8,7 +8,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. -The GNU Hurd is distributed in the hope that it will be useful, +The GNU Hurd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -32,6 +32,8 @@ mach_port_t diskfs_fsys_identity; int _diskfs_nosuid = 0, _diskfs_noexec = 0; +struct hurd_port _diskfs_exec_portcell; + spin_lock_t diskfs_node_refcnt_lock = SPIN_LOCK_INITIALIZER; spin_lock_t _diskfs_control_lock = SPIN_LOCK_INITIALIZER; @@ -46,12 +48,12 @@ struct port_class *diskfs_shutdown_notification_class; struct port_bucket *diskfs_port_bucket; /* Call this after arguments have been parsed to initialize the - library. */ + library. */ error_t diskfs_init_diskfs (void) { error_t err; - + if (diskfs_boot_flags) /* This is a boot filesystem, we have to do some things specially. */ { @@ -88,6 +90,8 @@ diskfs_init_diskfs (void) diskfs_port_bucket = ports_create_bucket (); + _hurd_port_init (&_diskfs_exec_portcell, MACH_PORT_NULL); + return 0; } |