Expand description
Wrapper functions around for raw_syscall, providing a typed and safer way to interact with the kernel.
Structs§
- Clock
- Clock
Flags - Flags about a given clock or clock read.
- ClockID
- ID used internally to read the appropriate clock source.
- Clock
Info - Information about a given clock source, including precision and current clock value.
- Create
TieFlags - Flags controlling how a particular object tie operates.
- Create
TieSpec - A specification of ties to create. (see the book for more information on ties).
- Delete
Flags - Flags to control operation of the object delete operation.
- Femto
Seconds - GetRandom
Flags - Kernel
Console Read Flags - Flags to pass to sys_kernel_console_read.
- Kernel
Console Write Flags - Flags to pass to sys_kernel_console_write.
- MapFlags
- Flags to pass to sys_object_map.
- MapInfo
- Information about an object mapping.
- Micro
Seconds - Milli
Seconds - Nano
Seconds - NewHandle
Flags - Flags to pass to sys_new_handle.
- Object
Create - Full object creation specification, minus ties.
- Object
Create Flags - Flags to pass to the object create system call.
- Object
Info - Information about an object, according to the local kernel.
- Object
Source - Specifications for an object-copy from a source object. The specified ranges are
source:[src_start, src_start + len) copied to
<some unspecified destination object>:[dest_start, dest_start + len)
. Each range must start within an object, and end within the object. - Pico
Seconds - Pinned
Page - Read
Clock Flags - Flags to pass to
sys_read_clock_info
. - Read
Clock List Flags - Flags to pass to
sys_read_clock_list
. - Seconds
- Sync
Flags - Flags for a sync command.
- Sync
Info - Parameters for the kernel for syncing a mapping.
- SysInfo
- Information about the system.
- Thread
Spawn Args - Arguments to pass to sys_spawn.
- Thread
Spawn Flags - Flags to pass to sys_spawn.
- Thread
Sync Flags - Flags to pass to sys_thread_sync.
- Thread
Sync Sleep - Specification for a thread sleep request.
- Thread
Sync Wake - Specification for a thread wake request.
- Time
Span - Trace
Spec - Tracing specification. Note that events can be disabled and enabled in one spec. It is unspecified if events are disabled or enabled first.
- Unbind
Handle Flags - Flags to pass to sys_unbind_handle.
- Unmap
Flags - Flags to pass to sys_object_unmap.
Enums§
- Backing
Type - The backing memory type for this object. Currently doesn’t do anything.
- Clock
Kind - Different kinds of clocks exposed by the kernel.
- Clock
Source - Possible clock sources.
- Handle
Type - Possible kernel handle types.
- Kernel
Console Source - Possible sources for a kernel console read syscall.
- Lifetime
Type - The base lifetime type of the object. Note that this does not ensure that the object is stored in a specific type of memory, the kernel is allowed to migrate objects with the Normal BackingType as it sees fit. For more information on object lifetime, see the book.
- MapControl
Cmd - Possible map control commands for sys_map_ctrl.
- Object
Control Cmd - Possible object control commands for sys_object_ctrl.
- Syscall
- All possible Synchronous syscalls into the Twizzler kernel.
- Thread
Control - Possible Thread Control operations
- Thread
Sync - Either a sleep or wake request. The syscall comprises of a number of either sleep or wake requests.
- Thread
Sync Op - Possible operations the kernel can perform when looking at the supplies reference and the
supplied value. If the operation
*reference OP value
evaluates to true (or false if the INVERT flag is passed), then the thread is put to sleep. - Thread
Sync Reference - A reference to a piece of data. May either be a non-realized persistent reference or a virtual address.
- Time
Unit Error - Upcall
Target Spawn Option
Constants§
Functions§
- sys_
debug_ shutdown Deprecated - Shutdown the computer.
- sys_
get_ random - sys_
info - Get a SysInfo struct from the kernel.
- sys_
kaction - Execute a kaction on an object.
- sys_
kernel_ console_ read - Read from the specified kernel console input, placing data into
buffer
. - sys_
kernel_ console_ read_ interruptable - Read from the specified kernel console input, placing data into
buffer
. - sys_
kernel_ console_ write - Write to the kernel console.
- sys_
ktrace - Trace events in the kernel, storing them in the provided object.
- sys_
map_ ctrl - Perform a kernel operation on this mapping.
- sys_
new_ handle - Make a new handle object.
- sys_
object_ create - Create an object, returning either its ID or an error.
- sys_
object_ ctrl - Perform a kernel operation on this object.
- sys_
object_ map - Map an object into the address space with the specified protections.
- sys_
object_ read_ map - Reads the map information about a given slot in the address space specified by
handle
(or current address space if none is specified). - sys_
object_ stat - Read information about a given object.
- sys_
object_ unmap - Unmaps an object from the address space specified by
handle
(or the current address space if none is specified). - sys_
read_ clock_ info - Read information about a give clock, as specified by clock source.
- sys_
read_ clock_ list - Discover a list of clock sources exposed by the kernel.
- sys_
sctx_ attach - Attach to a given security context.
- sys_
spawn ⚠ - Spawn a new thread, returning the ObjID of the thread’s handle or an error.
- sys_
thread_ active_ sctx_ id - Get the active security context ID for the calling thread.
- sys_
thread_ change_ state - Change the thread’s state. If successful, returns the previous state.
- sys_
thread_ ctrl - sys_
thread_ exit - Exit the thread. The code will be written to the crate::thread::ThreadRepr for the current thread as part of updating the status and code to indicate thread has exited.
- sys_
thread_ get_ trace_ events - Get the Trap State for the thread.
- sys_
thread_ get_ trap_ state - Get the Trap State for the thread.
- sys_
thread_ gettls - Get the current kernel thread’s TLS pointer.
- sys_
thread_ read_ registers - Read the thread’s CPU state. The thread must be suspended.
- sys_
thread_ ⚠resume_ from_ upcall - Resume from an upcall, restoring registers. If you can resume yourself in userspace, this call is not necessary.
- sys_
thread_ self_ id - Get the repr ID of the calling thread.
- sys_
thread_ send_ message - Send a user-defined async or sync event to the thread.
- sys_
thread_ set_ active_ sctx_ id - Get the active security context ID for the calling thread.
- sys_
thread_ set_ trace_ events - Set the Trap State for the thread.
- sys_
thread_ set_ trap_ state - Set the Trap State for the thread.
- sys_
thread_ set_ upcall - Set the upcall location for this thread.
- sys_
thread_ settls - Set the current kernel thread’s TLS pointer. On x86_64, for example, this changes user’s FS segment base to the supplies TLS value.
- sys_
thread_ sync - Perform a number of ThreadSync operations, either waking of threads waiting on words of memory, or sleeping this thread on one or more words of memory (or both). The order these requests are processed in is undefined.
- sys_
thread_ write_ registers - Write the thread’s CPU state. The thread must be suspended.
- sys_
thread_ yield - Yield the thread’s CPU time now. The actual effect of this is unspecified, but it acts as a hint to the kernel that this thread does not need to run right now. The kernel, of course, is free to ignore this hint.
- sys_
unbind_ handle - Unbind an object from handle status.
Type Aliases§
- Thread
Sync Result - Result of sync operations.