summaryrefslogtreecommitdiff
path: root/libports
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-01-01 19:11:32 +0000
committerRoland McGrath <roland@gnu.org>1999-01-01 19:11:32 +0000
commit37c58526f80aba5357cd010de61e6bbbd890851a (patch)
treef919e2e8e76b2b93bb0c745db0aee36df33165f7 /libports
parent479e3fa2d60d9d906ec365cae48a6eb52b14faa5 (diff)
1999-01-01 Roland McGrath <roland@baalperazim.frob.com>
* interrupt-on-notify.c (ports_interrupt_self_on_notification): Use assert to check we are in an rpc; don't return EIEIO (not appropriate).
Diffstat (limited to 'libports')
-rw-r--r--libports/interrupt-on-notify.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/libports/interrupt-on-notify.c b/libports/interrupt-on-notify.c
index 4f8c1344..42ae4884 100644
--- a/libports/interrupt-on-notify.c
+++ b/libports/interrupt-on-notify.c
@@ -1,8 +1,8 @@
/* Mark an rpc to be interrupted when a port dies
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 96, 99 Free Software Foundation, Inc.
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ Written by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -19,6 +19,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "ports.h"
+#include <assert.h>
/* Arrange for hurd_cancel to be called on RPC's thread if OBJECT gets notified
that any of the things in COND have happened to PORT. RPC should be an
@@ -175,11 +176,9 @@ ports_interrupt_self_on_notification (void *object,
break;
mutex_unlock (&_ports_lock);
- if (rpc)
- /* We don't have to worry about RPC going away after we dropped the lock
- because we're that thread, and we're still here. */
- return ports_interrupt_rpc_on_notification (object, rpc, port, what);
- else
- /* This thread isn't in an rpc! */
- return EIEIO;
+ assert (rpc);
+
+ /* We don't have to worry about RPC going away after we dropped the lock
+ because we're that thread, and we're still here. */
+ return ports_interrupt_rpc_on_notification (object, rpc, port, what);
}