diff options
Diffstat (limited to 'hurd/port-cleanup.c')
-rw-r--r-- | hurd/port-cleanup.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/hurd/port-cleanup.c b/hurd/port-cleanup.c index 0bb8267743..95b019c4c0 100644 --- a/hurd/port-cleanup.c +++ b/hurd/port-cleanup.c @@ -1,4 +1,4 @@ -/* Cleanup function for `struct hurd_port' users who longjmp. +/* Cleanup function for `struct hurd_port' users. Copyright (C) 1995-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -28,3 +28,14 @@ _hurd_port_cleanup (void *cleanup_data, jmp_buf env, int val) { __mach_port_deallocate (__mach_task_self (), (mach_port_t) cleanup_data); } + +/* We were cancelled while using a port, and called from the cleanup unwinding. + */ + +void +_hurd_port_use_cleanup (void *arg) +{ + struct _hurd_port_use_data *data = arg; + + _hurd_port_free (data->p, &data->link, data->port); +} |