8eb5e283cc
Previously, the ability to set/clear the user signal bits on an object via mx_object_signal() was controlled by MX_RIGHT_WRITE and the ability to set/clear the user signal bits on the peer of a channel, socket, or eventpair was not restricted at all. The new rights MX_RIGHT_SIGNAL and MX_RIGHT_SIGNAL_PEER are now used to provide access control for these operations. Change-Id: I3d82457c39c062f181615fa40266ac72eae2b802
1.1 KiB
1.1 KiB
mx_event_create
NAME
event_create - create an event
SYNOPSIS
#include <magenta/syscalls.h>
mx_status_t mx_event_create(uint32_t options, mx_handle_t* out);
DESCRIPTION
event_create() creates an event, which is an object that is signalable. That is, its MX_USER_SIGNAL_n (where n is 0 through 7) signals can be manipulated using object_signal().
The newly-created handle will have the MX_RIGHT_TRANSFER, MX_RIGHT_DUPLICATE, MX_RIGHT_READ, MX_RIGHT_WRITE, and MX_RIGHT_SIGNAL rights.
RETURN VALUE
event_create() returns MX_OK and a valid event handle (via out) on success. On failure, an error value is returned.
ERRORS
MX_ERR_INVALID_ARGS out is an invalid pointer, or options is nonzero.
MX_ERR_NO_MEMORY Temporary failure due to lack of memory.
SEE ALSO
eventpair_create, handle_close, handle_duplicate, object_wait_one, object_wait_many, handle_replace, object_signal.