zx_interrupt_trigger
名称
interrupt_trigger —— 触发虚拟中断对象
概要
#include <zircon/syscalls.h>
zx_status_t zx_interrupt_trigger(zx_handle_t handle, uint32_t options, zx_time_t timestamp);
描述
interrupt_trigger() 用于在中断对象上触发虚拟中断。 如果中断绑定到某端口,则导致中断消息包到达该端口;或如果interrupt_wait() 在等待这个中断,则导致此阻塞调用返回。
options必须为零。
权限
TODO(ZX-2399)
返回值
interrupt_trigger() 调用成功返回ZX_OK。如果调用失败,则返回负的错误码。
错误码
ZX_ERR_BAD_HANDLE: handle是无效句柄。
ZX_ERR_WRONG_TYPE:handle不是中断类型对象。
ZX_ERR_BAD_STATE:handle不是虚拟中断对象。
ZX_ERR_CANCELED:在handle上调用过zx_interrupt_destroy()。
ZX_ERR_ACCESS_DENIED:handle缺少ZX_RIGHT_SIGNAL权限。
ZX_ERR_INVALID_ARGS:options值非零。
另见
interrupt_ack, interrupt_bind, interrupt_create, interrupt_destroy, interrupt_wait, port_wait, handle_close.