/* Lightweight user references for ports.
-Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
}
+/* Cleanup function for non-local exits. */
+extern void _hurd_port_cleanup (void *, jmp_buf, int);
+
/* Get a reference to *PORT, which is locked.
Pass return value and LINK to _hurd_port_free when done. */
mach_port_t result;
result = port->port;
if (result != MACH_PORT_NULL)
- _hurd_userlink_link (&port->users, link);
+ {
+ link->cleanup = &_hurd_port_cleanup;
+ link->cleanup_data = (void *) result;
+ _hurd_userlink_link (&port->users, link);
+ }
__spin_unlock (&port->lock);
return result;
}