diff options
author | Michael I. Bushnell <mib@gnu.org> | 1996-05-25 21:32:26 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1996-05-25 21:32:26 +0000 |
commit | 0e32f27c58ef8ba3c0c54c48f296c922424df0a4 (patch) | |
tree | 15da7d31da012dcf2b06b8cb63b574d62ca5f956 /libmom | |
parent | e55dcf16d03bd83a72efa23a1d68d3f3c796e6f0 (diff) |
(mom_copy_ref): Omit uses of deleted members of struct mom_port_ref.c
Diffstat (limited to 'libmom')
-rw-r--r-- | libmom/copy-ref.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/libmom/copy-ref.c b/libmom/copy-ref.c index f0d37954..03d4ab45 100644 --- a/libmom/copy-ref.c +++ b/libmom/copy-ref.c @@ -26,18 +26,9 @@ mom_copy_ref (struct mom_port_ref *new, { error_t err; - new->lock = SPIN_LOCK_INITIALIZER; - - spin_lock (&obj->lock); - assert (obj->refcnt); err = mach_port_mod_refs (mach_task_self (), obj->port, MACH_PORT_RIGHT_SEND, 1); - new->port = obj->port; - spin_unlock (&obj->lock); - - if (err) - return err; - - new->refcnt = 1; - return 0; + if (!err) + new->port = obj->port; + return err; } |