1# zx_object_signal_peer 2 3## NAME 4 5<!-- Updated by update-docs-from-abigen, do not edit. --> 6 7object_signal_peer - signal an object's peer 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_object_signal_peer(zx_handle_t handle, 17 uint32_t clear_mask, 18 uint32_t set_mask); 19``` 20 21## DESCRIPTION 22 23`zx_object_signal_peer()` asserts and deasserts the userspace-accessible 24signal bits on the object's peer. A object peer is the opposite endpoint of a 25*channel*, *socket*, *fifo*, or *eventpair*. 26 27Most of the 32 signals are reserved for system use and are assigned to 28per-object functions, like **ZX_CHANNEL_READABLE** or **ZX_TASK_TERMINATED**. There 29are 8 signal bits available for userspace processes to use as they see fit: 30**ZX_USER_SIGNAL_0** through **ZX_USER_SIGNAL_7**. 31 32*Event* objects also allow control over the **ZX_EVENT_SIGNALED** bit. 33 34*Eventpair* objects also allow control over the **ZX_EVENTPAIR_SIGNALED** bit. 35 36The *clear_mask* is first used to clear any bits indicated, and then the 37*set_mask* is used to set any bits indicated. 38 39## RIGHTS 40 41<!-- Updated by update-docs-from-abigen, do not edit. --> 42 43*handle* must be of type **ZX_OBJ_TYPE_PROCESS** and have **ZX_RIGHT_SIGNAL_PEER**. 44 45## RETURN VALUE 46 47`zx_object_signal_peer()` returns **ZX_OK** on success. In the event of 48failure, a negative error value is returned. 49 50## ERRORS 51 52**ZX_ERR_BAD_HANDLE** *handle* is not a valid handle. 53 54**ZX_ERR_ACCESS_DENIED** *handle* lacks the right **ZX_RIGHT_SIGNAL_PEER**. 55 56**ZX_ERR_INVALID_ARGS** *clear_mask* or *set_mask* contain bits that are not allowed. 57 58**ZX_ERR_NOT_SUPPORTED** Used on an object lacking a peer. 59 60**ZX_ERR_PEER_CLOSED** Called on an object with a closed peer. 61 62## SEE ALSO 63 64 - [`zx_event_create()`] 65 - [`zx_eventpair_create()`] 66 - [`zx_object_signal()`] 67 68<!-- References updated by update-docs-from-abigen, do not edit. --> 69 70[`zx_event_create()`]: event_create.md 71[`zx_eventpair_create()`]: eventpair_create.md 72[`zx_object_signal()`]: object_signal.md 73