From 37eb58de74f83860949407c88088bf55964157e5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 18 Oct 1998 23:19:12 +0000 Subject: 1998-08-06 Mark Kettenis [submitted 1998-08-06] * mach/Machrules: Create target directory and force re-evaluation of Makefile to prevent `make' from optimizing away most of the implicit rules and `vpath' directives. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): If _hurd_msgport_thread is null, short-circuit to __mach_msg. --- hurd/intr-msg.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'hurd') diff --git a/hurd/intr-msg.c b/hurd/intr-msg.c index eb7adbef66..c7c45e7023 100644 --- a/hurd/intr-msg.c +++ b/hurd/intr-msg.c @@ -1,5 +1,5 @@ /* Replacement for mach_msg used in interruptible Hurd RPCs. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 95, 96, 97, 98 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 @@ -34,11 +34,23 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg, mach_msg_timeout_t timeout, mach_port_t notify) { - struct hurd_sigstate *ss = _hurd_self_sigstate (); error_t err; + struct hurd_sigstate *ss; + int user_timeout; + + if (_hurd_msgport_thread == MACH_PORT_NULL) + { + /* The signal thread is not set up yet, so we cannot do the + normal signal magic. Do a simple uninterruptible RPC instead. */ + return __mach_msg (msg, option, send_size, rcv_size, rcv_name, + timeout, notify); + } + + ss = _hurd_self_sigstate (); + /* Notice now if the user requested a timeout. OPTION may have the bit added by interruption semantics, and we must distinguish. */ - int user_timeout = option & MACH_RCV_TIMEOUT; + user_timeout = option & MACH_RCV_TIMEOUT; /* Tell the signal thread that we are doing an interruptible RPC on this port. If we get a signal and should return EINTR, the signal -- cgit v1.2.3