Age | Commit message (Collapse) | Author |
|
* proc/Makefile (MIGSTUBS): Add `gnumachServer.o'.
* proc/main.c (message_demuxer): Handle the `task_notify' protocol.
(main): Register for new task notificatinos.
* proc/mgt.c (S_mach_notify_new_task): Add server function.
|
|
* Makeconf (mach_defs_names): Add `task_notify'.
|
|
* trans/fakeroot.c (new_node): Initialize faked field to FAKE_DEFAULT.
|
|
* include/Makefile (installhdrs): Remove refcount.h.
|
|
Their faked field was not initialized.
Thanks a lot to Svante Signell for the investigation
* trans/fakeroot.c (new_node): Initialize faked field of nn to 0.
(netfs_attempt_mkfile): Call set_default_attributes on newly-allocated node,
and if the real mode is not the same as the requested mode, fake the mode.
|
|
For each hurd type defined in hurd_types.h, add a intranpayload
function. If an X_INTRAN mutation is defined for a type, a
corresponding X_INTRAN_PAYLOAD has to be defined. If no X_INTRAN
mutation is defined, use ports_payload_get_name as intranpayload
function, turning the payload back into an port name.
* hurd/hurd_types.defs: Add intranpayload functions.
* hurd/term.defs: Likewise.
* hurd/default_pager.defs: Include `hurd_types.defs' for
`MACH_PAYLOAD_TO_PORT'.
|
|
As the protected payloads were retrofitted into the Mach message
format, the local port type is lost.
* utils/rpctrace.c (is_notification): New function
(trace_and_forward): Recover the original local port type.
|
|
`fsysServer' is only used by the symlink translator which does not use
libports. Therefor, it is not necessary to use the default payload to
port translation function.
* trans/Makefile (fsys-MIGSFLAGS): Disable the default payload to port
translation function.
|
|
* trans/Makefile (device_reply-MIGSFLAGS): Define MACH_PAYLOAD_TO_PORT.
|
|
* trans/Makefile (password-MIGSFLAGS): Add mutator.
|
|
* trans/Makefile (ifsock-MIGSFLAGS): Add mutator.
|
|
* trans/fakeroot.c (netfs_demuxer): Make the demuxer payload-aware.
|
|
* term/mig-mutate.h: Add mutator.
|
|
startup does not use libports. Therefor, it is not necessary to use the
default payload to port translation function.
* startup/Makefile (MIGSFLAGS): Disable the default payload to port
translation function.
|
|
* proc/mig-decls.h (begin_using_proc_payload): New function.
(begin_using_exc_payload): Likewise.
* proc/mig-mutate.h: Add mutators.
* proc/proc_exc.defs (exception_t): Add payload-aware in-translator
function.
|
|
* pflocal/mig-mutate.h: Add mutators.
* pflocal/mig-decls.c (begin_using_sock_user_payload): New function.
(begin_using_addr_payload): Likewise.
|
|
* pfinet/ethernet.c (ethernet_demuxer): Make the demuxer payload-aware.
* pfinet/main.c (pfinet_demuxer): Likewise.
|
|
* pfinet/mig-mutate.h: Add mutators.
* pfinet/mig-decls.h (begin_using_socket_payload): New function.
(begin_using_sockaddr_payload): Likewise.
|
|
* exec/execmutations.h: Add mutators.
* exec/mig-decls.h (begin_using_bootinfo_payload): New function.
|
|
* console-client/trans.c (console_demuxer): make the demuxer payload-aware.
|
|
* console/priv.h (begin_using_protid_payload): New function.
* console/mutations.h: Add mutators.
|
|
* auth/mig-mutate.h: Add mutator.
* auth/mig-decls.h (auth_payload_to_handle): New function.
|
|
* libcons/mutations.h: Add mutator.
* libcons/priv.h (begin_using_notify_payload): New function.
|
|
* libpager/mig-decls.h (begin_using_pager_payload): New function.
* libpager/mig-mutate.h: Add mutators.
|
|
* libtrivfs/mig-decls.h (trivfs_begin_using_protid_payload): New function.
(trivfs_begin_using_control_payload): Likewise.
* libtrivfs/mig-mutate.h: Add mutators.
|
|
* libnetfs/priv.h (begin_using_protid_payload): New function.
* libnetfs/mutations.h: Add mutator.
|
|
* libdiskfs/diskfs.h (diskfs_begin_using_protid_payload): New function.
(diskfs_begin_using_control_payload): Likewise.
(diskfs_begin_using_bootinfo_payload): Likewise.
* libdiskfs/fsmutations.h: Add mutators.
|
|
* libports/mig-decls.h (begin_using_port_info_payload): New function.
* libports/mig-mutate.h: Add mutator.
|
|
These two functions map payloads to objects and port names. The former
can be used like `ports_lookup_port' to look up objects, the latter to
map payloads to port names if the server function expects a
`mach_port_t'.
* libports/ports.h: Add function ports_payload_get_name.
* libports/lookup-payload.c: New file.
* libports/ports.h (ports_lookup_payload): Add declaration.
* libports/Makefile (SRCS): Add lookup-payload.c.
|
|
|
|
Declare all functions `extern inline' instead of `static inline'.
This allows us to use them in functions declared as `extern inline'.
* libshouldbeinlibc/refcount.h: Move here, and declare all functions
`extern inline'.
* libshouldbeinlibc/refcount.c: And define the functions here.
* libshouldbeinlibc/Makefile: Add `refcount.{c,h}'.
|
|
This reverts "8927fbd63e29005ddb9b2c2264046089bf669857".
The change mistakenly adds mutators for the `startup' protocol, but
the server routine is for the `startup_notify' protocol.
|
|
This adds support for the __LOCK_ATOMIC flag which requests atomicity of SH->EX
upgrades and EX->SH downgrades.
* libfshelp/lock-acquire.c (__LOCK_ATOMIC): New macro
(fshelp_acquire_lock): When __LOCK_ATOMIC is set, do not release the
lock early, change the lock hold atomically instead. On upgrade to LOCK_EX,
prevent new shared locks from being acquired to avoid starvation.
|
|
* proc/notify.c (do_mach_notify_dead_name): When `pi' is NULL,
immediately return EOPNOTSUPP.
|
|
* libdiskfs/dir-init.c (diskfs_init_dir): Fix fabrication of protid.
|
|
Previously, `pager_demuxer' allocated a chunk of memory for the
response message. But if memory gets scarce, the kernel will issue a
large number of paging requests to free up memory. In such a
situation, allocating memory is dangerous.
Fix this by not allocating space for the response message, rather, use
a chunk of the workers stack space. Also, we only handle the `notify'
and `memory_object' protocol, which both only contain simple routines,
we only need a `mig_response_header_t'.
* libpager/demuxer.c (struct request): Remove `inp' and `outp'.
(request_inp): New function.
(pager_demuxer): Do not allocate memory for the response.
(mig_reply_setup): New function.
(worker_func): Adjust accordingly.
|
|
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function.
* boot/boot.c (mig_reply_setup): Provide local version.
(request_server): Rename to `boot_demuxer', and improve the dispatch.
|
|
* boot/boot.c (pseudo_time): New variable.
(main): Allocate port `pseudo_time'.
(ds_device_open): Give out `pseudo_time'.
(ds_device_map): Emulate Mach-style `Mapped Time'.
|
|
* boot/boot.c (ds_device_get_status): Support flavor DEV_GET_RECORDS.
|
|
* boot/boot.c (ds_xxx_device_set_status): Remove function.
(ds_xxx_device_get_status): Likewise.
(ds_xxx_device_set_filter): Likewise.
|
|
The unused function `boot_script_read_file' requires access to the
default pager, which is privileged.
* boot/boot.c (defpager): Remove now unused variable.
(boot_script_read_file): Remove unused function.
(main): Do not acquire port to the default pager.
* boot/boot_script.h (boot_script_read_file): Remove declaration.
|
|
GNU Mach never sent old-style bootstrap messages. Drop the unused
compatibility code.
* boot/boot.c (request_server): Drop unused code.
(bootstrap_compat): Drop unused function.
|
|
* startup/startup.c (main): Also open `console' for reading.
|
|
* proc/main.c (increase_priority): New function.
(main): Move code increasing the proc servers priority to a new
function and handle errors gracefully.
|
|
* Makeconf (mach_defs_names): Add `gnumach'.
|
|
Previously, the Hurd (ab)used the fact that the startup server speaks
all protocols on its message port. Any server that wished to register
for shutdown notifications would use proc_getmsgport to get a port to
the startup server.
This hardcodes the PID of /hurd/startup, and does not allow one to
point a server to ones own startup server (e.g. using remap).
Bind the startup server to /servers/startup instead. Use this to
contact the startup server.
* exec/main.c (S_exec_init): Use /servers/startup. Fall back to the
old method so that the system still boots when the node
/servers/startup is missing.
* hurd/paths.h (_SERVERS_STARTUP): New macro.
* libdiskfs/boot-start.c (diskfs_S_fsys_init): Use /servers/startup.
* libdiskfs/init-startup.c (_diskfs_init_completed): Likewise.
* pfinet/main.c (arrange_shutdown_notification): Likewise.
* startup/Makefile (OBJS): Add fsysServer.o.
* startup/startup.c (demuxer): Handle the fsys protocol.
(main): Bind to /servers/startup.
(S_fsys_getroot): Implement fsys_getroot. Stub out the rest.
|
|
* startup/startup.c (demuxer): Fix the declaration of the server functions.
|
|
Use the BOOT macro to print either halt or reboot instead of the
generic shutdown in the event of an system shutdown.
* startup/startup.c (reboot_system): Use more specific message.
|
|
Formerly /hurd/startup would forward all signals to the child it
started (e.g. /libexec/runsystem).
The motivation for doing so is not revealed in the comments, nor it is
mentioned in the history of the version control system.
This patch removes the forwarding of signals to the child.
* startup/startup.c (process_signal): Do not pass signals on to the child.
* startup/stubs.c: Remove file.
* startup/Makefile: Remove stubs.c.
|
|
This patch adds a minimalist init program. It is somewhat lacking in
features, but is able to bring up a Hurd system with the runsystem and
rc scripts. In fact, it roughly does what the former /hurd/init did,
modulo all the very early bootstrapping stuff and the startup
protocol. It is started when all the essential servers are up and
running, so it can make use of most of the POSIX goodies, making its
implementation much simpler.
* Makefile (prog-subdirs): Add init.
* daemons/runsystem.sh: Generalize runsystem so that it can start any
init as specified on the kernel command line. By default, it starts
/hurd/init.
* daemons/runsystem.hurd: This is a verbatim copy of runsystem.sh. It
is started by /hurd/init.
* daemons/rc.sh: Do not start /hurd/mach-defpager as it is already
started in runsystem.sh.
* daemons/Makefile (SRCS): Add runsystem.hurd.
* init/Makefile: New file.
* init/init.c: Likewise.
|