#include <kern/extmod_statistics.h>

kern/extmod_statistics.h Kernel.framework

kern/extmod_statistics.h Definitions for statistics related to external modification of a task by another agent on the system.
3 functions

functionextmod_statistics_incr_task_for_pid

extern void extmod_statistics_incr_task_for_pid(task_t target)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/kern/extmod_statistics.c
Increments the external-modification statistics recording a task_for_pid on the target task: bumps the caller's task_for_pid_caller_count, the target's task_for_pid_count, and the host-wide count. Does nothing when the caller is the kernel task, when target is TASK_NULL, or when a task acts on itself. These counters (task_extmod_info, host statistics) help triage crashes caused by one userspace task modifying another.

functionextmod_statistics_incr_thread_set_state

extern void extmod_statistics_incr_thread_set_state(thread_t target)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/kern/extmod_statistics.c
Increments the external-modification statistics recording a thread_set_state on a thread of another task: bumps the caller's thread_set_state_caller_count, the target task's thread_set_state_count, and the host-wide count. Does nothing when the caller is the kernel task, target is THREAD_NULL, or the thread belongs to the calling task.

functionextmod_statistics_incr_thread_create

extern void extmod_statistics_incr_thread_create(task_t target)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/kern/extmod_statistics.c
Increments the external-modification statistics recording creation of a thread in another task: bumps the caller's thread_creation_caller_count, the target's thread_creation_count and the host-wide count, and logs the event to the BSD message tracer. Does nothing when the caller is the kernel task, target is TASK_NULL, or a task creates a thread in itself.