#include <sys/cdefs.h>
+#ifndef KERNEL
+#include <Availability.h>
+#endif
+
/*
* Kernel-related ports; how a task/thread controls itself
*/
__BEGIN_DECLS
extern mach_port_t mach_host_self(void);
extern mach_port_t mach_thread_self(void);
+__API_AVAILABLE(macos(11.3), ios(14.5), tvos(14.5), watchos(7.3))
+extern boolean_t mach_task_is_self(task_name_t task);
extern kern_return_t host_page_size(host_t, vm_size_t *);
extern mach_port_t mach_task_self_;