summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2022-12-11 01:51:50 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-12-11 09:03:57 +0100
commitc66f3931b45ef05a9acfdaf5b9a6a3e35155e47f (patch)
treea95ddfefbadf62236068369cbc50b476dca2859a /ipc
parente6c5ed2c7f9b463833a6592c892ff2920fc88502 (diff)
Delete rpc copyout multiname code
Message-Id: <Y5V+BovjWo1CCjBc@jupiter.tail36e24.ts.net>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_object.c56
-rw-r--r--ipc/ipc_right.c35
2 files changed, 0 insertions, 91 deletions
diff --git a/ipc/ipc_object.c b/ipc/ipc_object.c
index ebe11492..3fd7f92b 100644
--- a/ipc/ipc_object.c
+++ b/ipc/ipc_object.c
@@ -666,62 +666,6 @@ ipc_object_copyout(
return kr;
}
-#if 0
-/* XXX same, but don't check for already-existing send rights */
-kern_return_t
-ipc_object_copyout_multiname(space, object, namep)
- ipc_space_t space;
- ipc_object_t object;
- mach_port_t *namep;
-{
- mach_port_t name;
- ipc_entry_t entry;
- kern_return_t kr;
-
- assert(IO_VALID(object));
- assert(io_otype(object) == IOT_PORT);
-
- is_write_lock(space);
-
- for (;;) {
- if (!space->is_active) {
- is_write_unlock(space);
- return KERN_INVALID_TASK;
- }
-
- kr = ipc_entry_alloc(space, &name, &entry);
- if (kr != KERN_SUCCESS) {
- is_write_unlock(space);
- return kr; /* space is unlocked */
- }
-
- assert(IE_BITS_TYPE(entry->ie_bits) == MACH_PORT_TYPE_NONE);
- assert(entry->ie_object == IO_NULL);
-
- io_lock(object);
- if (!io_active(object)) {
- io_unlock(object);
- ipc_entry_dealloc(space, name, entry);
- is_write_unlock(space);
- return KERN_INVALID_CAPABILITY;
- }
-
- entry->ie_object = object;
- break;
- }
-
- /* space is write-locked and active, object is locked and active */
-
- kr = ipc_right_copyout_multiname(space, name, entry, object);
- /* object is unlocked */
- is_write_unlock(space);
-
- if (kr == KERN_SUCCESS)
- *namep = name;
- return kr;
-}
-#endif /* 0 */
-
/*
* Routine: ipc_object_copyout_name
* Purpose:
diff --git a/ipc/ipc_right.c b/ipc/ipc_right.c
index b62c9314..79f70c3d 100644
--- a/ipc/ipc_right.c
+++ b/ipc/ipc_right.c
@@ -1978,41 +1978,6 @@ ipc_right_copyout(
return KERN_SUCCESS;
}
-#if 0
-/*XXX same, but allows multiple duplicate send rights */
-kern_return_t
-ipc_right_copyout_multiname(space, name, entry, object)
- ipc_space_t space;
- mach_port_t name;
- ipc_entry_t entry;
- ipc_object_t object;
-{
- ipc_entry_bits_t bits = entry->ie_bits;
- ipc_port_t port;
-
- assert(IO_VALID(object));
- assert(io_otype(object) == IOT_PORT);
- assert(io_active(object));
- assert(entry->ie_object == object);
-
- port = (ipc_port_t) object;
-
- assert(port->ip_srights > 0);
-
- assert(IE_BITS_TYPE(bits) == MACH_PORT_TYPE_NONE);
- assert(IE_BITS_UREFS(bits) == 0);
-
- /* transfer send right and ref to entry */
- ip_unlock(port);
-
- /* entry is locked holding ref, so can use port */
-
- entry->ie_bits = (bits | MACH_PORT_TYPE_SEND) + 1;
-
- return KERN_SUCCESS;
-}
-#endif
-
/*
* Routine: ipc_right_rename
* Purpose: