Crate magenta [] [src]

Type-safe bindings for Magenta kernel syscalls.

Structs

Channel

An object representing a Magenta channel.

Event

An object representing a Magenta event object.

EventPair

An object representing a Magenta event pair.

Fifo

An object representing a Magenta fifo.

Handle

An object representing a Magenta handle.

HandleRef

A borrowed reference to a Handle.

Job

An object representing a Magenta job.

MessageBuf

A buffer for receiving messages from a channel.

Packet

A packet sent through a port. This is a type-safe wrapper for mx_port_packet_t.

Port

An object representing a Magenta port.

Process

An object representing a Magenta process.

SignalPacket

Contents of a signal packet (one generated by the kernel). This is a type-safe wrapper for mx_packet_signal_t.

Socket

An object representing a Magenta socket.

Thread

An object representing a Magenta thread.

Timer

An object representing a Magenta event pair.

UserPacket

Contents of a user packet (one sent by port_queue). This is a type-safe wrapper for mx_packet_user_t.

Vmo

An object representing a Magenta virtual memory object.

WaitItem

A "wait item" containing a handle reference and information about what signals to wait on, and, on return from object_wait_many, which are pending.

Enums

ChannelOpts

Options for creating a channel.

ClockId

An identifier to select a particular clock. See mx_time_get for more information about the possible values.

EventOpts

Options for creating an event object.

EventPairOpts

Options for creating an event pair.

FifoOpts

Options for creating a fifo pair.

PacketContents

The contents of a Packet.

PortOpts

Options for creating a port.

SocketOpts

Options for creating a socket pair.

SocketReadOpts

Options for reading from a socket.

SocketWriteOpts

Options for writing into a socket.

Status

A status code returned from the Magenta kernel.

TimerOpts

Options for creating a timer.

VmoCloneOpts
VmoOp
VmoOpts

Options for creating virtual memory objects. None supported yet.

WaitAsyncOpts

Options for wait_async.

Constants

MX_CHANNEL_PEER_CLOSED
MX_CHANNEL_READABLE
MX_CHANNEL_WRITABLE
MX_EPAIR_CLOSED
MX_EPAIR_SIGNALED
MX_EVENT_SIGNALED
MX_RIGHT_DEBUG
MX_RIGHT_DUPLICATE
MX_RIGHT_EXECUTE
MX_RIGHT_GET_PROPERTY
MX_RIGHT_MAP
MX_RIGHT_NONE
MX_RIGHT_READ
MX_RIGHT_SAME_RIGHTS
MX_RIGHT_SET_PROPERTY
MX_RIGHT_TRANSFER
MX_RIGHT_WRITE
MX_SIGNAL_HANDLE_CLOSED
MX_SIGNAL_LAST_HANDLE
MX_SIGNAL_NONE
MX_SOCKET_PEER_CLOSED
MX_SOCKET_READABLE
MX_SOCKET_WRITABLE
MX_TASK_TERMINATED
MX_TIMER_SIGNALED
MX_TIME_INFINITE
MX_USER_SIGNAL_0
MX_USER_SIGNAL_1
MX_USER_SIGNAL_2
MX_USER_SIGNAL_3
MX_USER_SIGNAL_4
MX_USER_SIGNAL_5
MX_USER_SIGNAL_6
MX_USER_SIGNAL_7

Traits

Cookied

A trait implemented by all handles for objects which can have a cookie attached.

HandleBase

A trait implemented by all handle objects.

Peered

A trait implemented by all handles for objects which have a peer.

Functions

deadline_after

Compute a deadline for the time in the future that is the given Duration away.

nanosleep

Sleep until the given deadline.

object_wait_many

Wait on multiple handles. The success return value is a bool indicating whether one or more of the provided handle references was closed during the wait.

ticks_get

Read the number of high-precision timer ticks since boot. These ticks may be processor cycles, high speed timer, profiling timer, etc. They are not guaranteed to continue advancing when the system is asleep.

ticks_per_second

Return the number of high-precision timer ticks in a second.

time_get

Get the current time, from the specific clock id.

Type Definitions

Rights

Rights associated with a handle.

Signals

Signals that can be waited upon.