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