blob: 15d113f8644a4e55c79a658ace0ddac2fab535d4 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library zx;
[Transport = "Syscall"]
protocol task {
// TODO(scottmg): Need something like handle<task> in this file to mean {job, process, thread}.
// Or otherwise some way to express multiple options for constraints on inputs in this protocol.
/// Suspend the given task. Currently only thread or process handles may be suspended.
/// Rights: handle must be of type ZX_OBJ_TYPE_THREAD or ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_WRITE.
task_suspend(handle handle) -> (status status, handle token);
/// Suspend the given task. Currently only thread or process handles may be suspended.
/// Rights: handle must be of type ZX_OBJ_TYPE_THREAD or ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_WRITE.
task_suspend_token(handle handle) -> (status status, handle token);
/// Create an exception channel for a given job, process, or thread.
/// Rights: handle must have ZX_RIGHT_INSPECT and have ZX_RIGHT_DUPLICATE and have ZX_RIGHT_TRANSFER and have ZX_RIGHT_MANAGE_THREAD.
/// Rights: If handle is of type ZX_OBJ_TYPE_JOB or ZX_OBJ_TYPE_PROCESS, it must have ZX_RIGHT_ENUMERATE.
task_create_exception_channel(handle handle, uint32 options) -> (status status, handle<channel> out);
/// Kill the provided task (job, process, or thread).
/// Rights: handle must have ZX_RIGHT_DESTROY.
task_kill(handle handle) -> (status status);
};