NAME
task_suspend - suspends specified task

SYNOPSIS
#include <mach.h>

kern_return_t task_suspend(target_task)
task_t target_task;

ARGUMENTS
target_task The task to be suspended.

DESCRIPTION
Increments the task’s suspend count and stops all threads in the
task. As long as the suspend count is positive newly created
threads will not run. This call does not return until all threads
are suspended.

The count may become greater than one, with the effect that it will
take more than one resume call to restart the task.

DIAGNOSTICS
KERN_SUCCESS The task has been suspended.

KERN_INVALID_ARGUMENT target_task is not a task.

SEE ALSO
task_create(2), task_terminate(2), task_resume(2), task_info(2),
thread_suspend(2)