## task_suspend

Function - Suspend the target task.

### SYNOPSIS

    kern_return_t   task_suspend
                    (task_t          task);

### PARAMETERS

task
  [in task send right] The port for the task to be suspended.

### DESCRIPTION

The task_suspend function increments the suspend count for task and stops all threads within the task. As long as the suspend count is positive, no newly-created threads can execute. The function does not return until all of the task's threads have been suspended.

### NOTES

To resume a suspended task and its threads, use task_resume. If the suspend count is greater than one, task_resume must be repeated that number of times.

### RETURN VALUES

Only generic errors apply.

### RELATED INFORMATION

Functions: task_create, task_info, task_resume, task_terminate, thread_suspend.