1# zx_port_cancel 2 3## NAME 4 5<!-- Updated by update-docs-from-abigen, do not edit. --> 6 7port_cancel - cancels async port notifications on an object 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_port_cancel(zx_handle_t handle, 17 zx_handle_t source, 18 uint64_t key); 19``` 20 21## DESCRIPTION 22 23`zx_port_cancel()` is a non-blocking syscall which cancels 24pending [`zx_object_wait_async()`] calls done with *source* and *key*. 25 26When this call succeeds no new packets from the object pointed by 27*source* with *key* will be delivered to *handle*, and pending queued 28packets that match *source* and *key* are removed from the port. 29 30## RIGHTS 31 32<!-- Updated by update-docs-from-abigen, do not edit. --> 33 34*handle* must be of type **ZX_OBJ_TYPE_PORT** and have **ZX_RIGHT_WRITE**. 35 36## RETURN VALUE 37 38`zx_port_cancel()` returns **ZX_OK** if cancellation succeeded and 39either queued packets were removed or pending [`zx_object_wait_async()`] were 40canceled. 41 42## ERRORS 43 44**ZX_ERR_BAD_HANDLE** *source* or *handle* is not a valid handle. 45 46**ZX_ERR_WRONG_TYPE** *handle* is not a port handle. 47 48**ZX_ERR_ACCESS_DENIED** *source* or *handle* does not have **ZX_RIGHT_WRITE**. 49 50**ZX_ERR_NOT_SUPPORTED** *source* is a handle that cannot be waited on. 51 52**ZX_ERR_NOT_FOUND** if either no pending packets or pending 53[`zx_object_wait_async()`] calls with *source* and *key* were found. 54 55## SEE ALSO 56 57 - [`zx_port_wait()`] 58 59<!-- References updated by update-docs-from-abigen, do not edit. --> 60 61[`zx_object_wait_async()`]: object_wait_async.md 62[`zx_port_wait()`]: port_wait.md 63