Expand description
Type-safe bindings for Magenta kernel syscalls.
Structs§
- Channel
- An object representing a Magenta channel.
- Event
- An object representing a Magenta event object.
- Event
Pair - An object representing a Magenta event pair.
- Fifo
- An object representing a Magenta fifo.
- Handle
- An object representing a Magenta handle.
- Handle
Ref - A borrowed reference to a
Handle
. - Job
- An object representing a Magenta job.
- Message
Buf - 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.
- Signal
Packet - 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.
- User
Packet - 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.
- Wait
Item - 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§
- Channel
Opts - Options for creating a channel.
- ClockId
- An identifier to select a particular clock. See mx_time_get for more information about the possible values.
- Event
Opts - Options for creating an event object.
- Event
Pair Opts - Options for creating an event pair.
- Fifo
Opts - Options for creating a fifo pair.
- Packet
Contents - The contents of a
Packet
. - Port
Opts - Options for creating a port.
- Socket
Opts - Options for creating a socket pair.
- Socket
Read Opts - Options for reading from a socket.
- Socket
Write Opts - Options for writing into a socket.
- Status
- A status code returned from the Magenta kernel.
- Timer
Opts - Options for creating a timer.
- VmoClone
Opts - VmoOp
- VmoOpts
- Options for creating virtual memory objects. None supported yet.
- Wait
Async Opts - Options for wait_async.
Constants§
- MX_
CHANNEL_ PEER_ CLOSED - MX_
CHANNEL_ READABLE - MX_
CHANNEL_ WRITABLE - MX_
CPRNG_ ADD_ ENTROPY_ MAX_ LEN - MX_
CPRNG_ DRAW_ MAX_ LEN - 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§
- AsHandle
Ref - A trait to get a reference to the underlying handle of an object.
- Cookied
- A trait implemented by all handles for objects which can have a cookie attached.
- Handle
Based - A trait implemented by all handle-based types.
- Peered
- A trait implemented by all handles for objects which have a peer.
Functions§
- cprng_
add_ entropy - Mix the given entropy into the kernel CPRNG.
- cprng_
draw - Draw random bytes from the kernel’s CPRNG to fill the given buffer. Returns the actual number of bytes drawn, which may sometimes be less than the size of the buffer provided.
- 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.
- size_
to_ u32_ sat - 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.
- usize_
into_ u32