summaryrefslogtreecommitdiff
path: root/libports/destroy-right.c
diff options
context:
space:
mode:
Diffstat (limited to 'libports/destroy-right.c')
-rw-r--r--libports/destroy-right.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/libports/destroy-right.c b/libports/destroy-right.c
index 704c0f57..327029a8 100644
--- a/libports/destroy-right.c
+++ b/libports/destroy-right.c
@@ -1,5 +1,5 @@
-/*
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/*
+ Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
Written by Michael I. Bushnell.
This file is part of the GNU Hurd.
@@ -23,30 +23,29 @@
#include <hurd/ihash.h>
#include <assert.h>
-void
+error_t
ports_destroy_right (void *portstruct)
{
struct port_info *pi = portstruct;
error_t err;
-
+
if (pi->port_right != MACH_PORT_NULL)
{
mutex_lock (&_ports_lock);
- ihash_locp_remove (pi->bucket->htable, pi->hentry);
+ hurd_ihash_locp_remove (&pi->bucket->htable, pi->hentry);
err = mach_port_mod_refs (mach_task_self (), pi->port_right,
MACH_PORT_RIGHT_RECEIVE, -1);
assert_perror (err);
mutex_unlock (&_ports_lock);
-
+
pi->port_right = MACH_PORT_NULL;
-
+
if (pi->flags & PORT_HAS_SENDRIGHTS)
{
pi->flags &= ~PORT_HAS_SENDRIGHTS;
ports_port_deref (pi);
}
}
-}
-
-
+ return 0;
+}