summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fstests/fstests.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fstests/fstests.c b/fstests/fstests.c
index 09ac9ba3..cc48f3e9 100644
--- a/fstests/fstests.c
+++ b/fstests/fstests.c
@@ -30,6 +30,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* mach_port_t _hurd_msgport = MACH_PORT_NULL; */
+int check_refs (mach_port_t port) /* To call from gdb */
+{
+ int err;
+ mach_port_urefs_t refs;
+ err = mach_port_get_refs (mach_task_self (),
+ port, MACH_PORT_RIGHT_SEND, &refs);
+ return err ? -err : refs;
+}
+
void
main ()
{