1# zx_event_create
2
3## NAME
4
5<!-- Updated by update-docs-from-abigen, do not edit. -->
6
7event_create - create an event
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_event_create(uint32_t options, zx_handle_t* out);
17```
18
19## DESCRIPTION
20
21`zx_event_create()` creates an event, which is an object that is signalable. That
22is, its **ZX_USER_SIGNAL_n** (where *n* is 0 through 7) signals can be
23manipulated using [`zx_object_signal()`].
24
25The newly-created handle will have the [basic
26rights](../rights.md#zx_rights_basic) plus **ZX_RIGHT_SIGNAL**.
27
28## RIGHTS
29
30<!-- Updated by update-docs-from-abigen, do not edit. -->
31
32TODO(ZX-2399)
33
34## RETURN VALUE
35
36`zx_event_create()` returns **ZX_OK** and a valid event handle (via *out*) on success.
37On failure, an error value is returned.
38
39## ERRORS
40
41**ZX_ERR_INVALID_ARGS**  *out* is an invalid pointer, or *options* is nonzero.
42
43**ZX_ERR_NO_MEMORY**  Failure due to lack of memory.
44There is no good way for userspace to handle this (unlikely) error.
45In a future build this error will no longer occur.
46
47## SEE ALSO
48
49 - [`zx_eventpair_create()`]
50 - [`zx_handle_close()`]
51 - [`zx_handle_duplicate()`]
52 - [`zx_handle_replace()`]
53 - [`zx_object_signal()`]
54 - [`zx_object_wait_async()`]
55 - [`zx_object_wait_many()`]
56 - [`zx_object_wait_one()`]
57
58<!-- References updated by update-docs-from-abigen, do not edit. -->
59
60[`zx_eventpair_create()`]: eventpair_create.md
61[`zx_handle_close()`]: handle_close.md
62[`zx_handle_duplicate()`]: handle_duplicate.md
63[`zx_handle_replace()`]: handle_replace.md
64[`zx_object_signal()`]: object_signal.md
65[`zx_object_wait_async()`]: object_wait_async.md
66[`zx_object_wait_many()`]: object_wait_many.md
67[`zx_object_wait_one()`]: object_wait_one.md
68