summaryrefslogtreecommitdiff
path: root/libports/ports.h
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2021-08-05 18:36:30 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-10 22:12:25 +0200
commit2c6c2b011eda70abac23c6ff9702917485f9ed3b (patch)
tree6e4f3f48eb7e0374c684318670984e9e71c9d15c /libports/ports.h
parent009ef29d60bb83dd6fdaeb647e27b3e0e385a733 (diff)
libports: Add ports_request_dead_name_notification ()
This significantly cuts down the boilerplate of requesting dead-name notifications.
Diffstat (limited to 'libports/ports.h')
-rw-r--r--libports/ports.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libports/ports.h b/libports/ports.h
index f8ce9b6c..2d6f6a60 100644
--- a/libports/ports.h
+++ b/libports/ports.h
@@ -322,6 +322,14 @@ void ports_port_deref_weak (void *port);
__pi ? (__pi->bucket->notify_port == __pi) : 0; \
})
+/* Request a dead-name notification for NAME on behalf of OBJECT.
+ If PREVIOUS is null, deallocate any previously registered port,
+ otherwise return it. If OBJECT is null, cancel the previously
+ registered notification. */
+error_t ports_request_dead_name_notification (void *object,
+ mach_port_t name,
+ mach_port_t *previous);
+
/* The user is responsible for listening for no senders notifications;
when one arrives, call this routine for the PORT the message was
sent to, providing the MSCOUNT from the notification. */