1# zx_interrupt_wait 2 3## NAME 4 5<!-- Updated by update-docs-from-abigen, do not edit. --> 6 7interrupt_wait - wait for an interrupt 8 9## SYNOPSIS 10 11<!-- Updated by update-docs-from-abigen, do not edit. --> 12 13``` 14#include <zircon/syscalls.h> 15 16zx_status_t zx_interrupt_wait(zx_handle_t handle, zx_time_t* out_timestamp); 17``` 18 19## DESCRIPTION 20 21`zx_interrupt_wait()` is a blocking syscall which causes the caller to 22wait until an interrupt is triggered. It can only be used on interrupt 23objects that have not been bound to a port with [`zx_interrupt_bind()`] 24 25It also, before the waiting begins, will acknowledge the interrupt object, 26as if [`zx_interrupt_ack()`] were called on it. 27 28The wait may be aborted with [`zx_interrupt_destroy()`] or by closing the handle. 29 30## RIGHTS 31 32<!-- Updated by update-docs-from-abigen, do not edit. --> 33 34*handle* must be of type **ZX_OBJ_TYPE_INTERRUPT** and have **ZX_RIGHT_WAIT**. 35 36## RETURN VALUE 37 38`zx_interrupt_wait()` returns **ZX_OK** on success, and *out_timestamp*, if 39non-NULL, returns the timestamp of when the interrupt was triggered (relative 40to **ZX_CLOCK_MONOTONIC**) 41 42## ERRORS 43 44**ZX_ERR_BAD_HANDLE** *handle* is an invalid handle. 45 46**ZX_ERR_WRONG_TYPE** *handle* is not a handle to an interrupt object. 47 48**ZX_ERR_BAD_STATE** the interrupt object is bound to a port. 49 50**ZX_ERR_ACCESS_DENIED** *handle* lacks **ZX_RIGHT_WAIT**. 51 52**ZX_ERR_CANCELED** *handle* was closed while waiting or [`zx_interrupt_destroy()`] was called 53on it. 54 55**ZX_ERR_INVALID_ARGS** the *out_timestamp* parameter is an invalid pointer. 56 57## SEE ALSO 58 59 - [`zx_handle_close()`] 60 - [`zx_interrupt_ack()`] 61 - [`zx_interrupt_bind()`] 62 - [`zx_interrupt_create()`] 63 - [`zx_interrupt_destroy()`] 64 - [`zx_interrupt_trigger()`] 65 - [`zx_port_wait()`] 66 67<!-- References updated by update-docs-from-abigen, do not edit. --> 68 69[`zx_handle_close()`]: handle_close.md 70[`zx_interrupt_ack()`]: interrupt_ack.md 71[`zx_interrupt_bind()`]: interrupt_bind.md 72[`zx_interrupt_create()`]: interrupt_create.md 73[`zx_interrupt_destroy()`]: interrupt_destroy.md 74[`zx_interrupt_trigger()`]: interrupt_trigger.md 75[`zx_port_wait()`]: port_wait.md 76