diff options
author | Michael I. Bushnell <mib@gnu.org> | 1996-04-25 19:36:50 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1996-04-25 19:36:50 +0000 |
commit | fac6d9a6d59a83e96314103b3181f6f692537014 (patch) | |
tree | 7c85f3bab7e22f0c603bdbcc69d65ff210d5d354 /proc/notify.c | |
parent | 73eae492a741dbe1b2bcd919374bea8c328a4e45 (diff) |
Many changes to support multi-threading. See ChangeLog.
Diffstat (limited to 'proc/notify.c')
-rw-r--r-- | proc/notify.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/proc/notify.c b/proc/notify.c index 19a8be33..9d48d945 100644 --- a/proc/notify.c +++ b/proc/notify.c @@ -47,23 +47,28 @@ do_mach_notify_dead_name (mach_port_t notify, return 0; } - p = reqport_find (notify); + p = ports_lookup_port (proc_bucket, notify, proc_class); if (!p) return EOPNOTSUPP; - if (p->p_reqport == deadport) + if (p->p_msgport == deadport) { message_port_dead (p); + ports_port_deref (p); return 0; } else if (p->p_task == deadport) { process_has_exited (p); + ports_port_deref (p); return 0; } else - return EINVAL; + { + ports_port_deref (p); + return EINVAL; + } } /* We get no-senders notifications on exception ports that we @@ -72,16 +77,7 @@ kern_return_t do_mach_notify_no_senders (mach_port_t notify, mach_port_mscount_t mscount) { - struct exc *e = exc_find (notify); - if (!e) - return EOPNOTSUPP; - - remove_exc_from_hash (e); - mach_port_mod_refs (mach_task_self (), e->excport, - MACH_PORT_RIGHT_RECEIVE, -1); - mach_port_deallocate (mach_task_self (), e->forwardport); - free (e); - return 0; + return ports_do_mach_notify_no_senders (notify, mscount); } kern_return_t |