port
The thread port.
let port: Mach.Thread
The thread port.
let port: Mach.Thread
import MachCore
The core module for interacting with the Mach kernel.
struct ThreadStateManager
A thread state manager.
struct Mach
The Mach kernel.
class Thread
A thread in a task.
init(thread: Mach.Thread)
Creates a thread state manager.
static func convert<DataType>(_ state: DataType, withFlavor flavor: Mach.ThreadStateFlavor, fromThread: Mach.Thread) throws -> DataType where DataType : BitwiseCopyable
Converts a thread state from another thread to the current thread.
static func convert<DataType>(_ state: DataType, withFlavor flavor: Mach.ThreadStateFlavor, thread: Mach.Thread, direction: Mach.ThreadStateConvertDirection) throws -> DataType where DataType : BitwiseCopyable
Converts a thread state either to or from the current thread.
static func convert<DataType>(_ state: DataType, withFlavor flavor: Mach.ThreadStateFlavor, toThread: Mach.Thread) throws -> DataType where DataType : BitwiseCopyable
Converts a thread state from the current thread to another thread.
var armDebugState32: arm_debug_state32_t { get throws }
The ARM debug state of the thread (32-bit).
var armDebugState32Legacy: arm_debug_state_t { get throws }
The legacy (pre-Armv8) ARM debug state of the thread (32-bit).
var armDebugState64: arm_debug_state64_t { get throws }
The ARM debug state of the thread (64-bit).
var armExceptionState32: arm_exception_state32_t { get throws }
The ARM exception state of the thread (32-bit).
var armExceptionState64: arm_exception_state64_t { get throws }
The ARM exception state of the thread (64-bit).
var armNEONState32: ARMNEONState32 { get throws }
The ARM NEON state of the thread (32-bit).
var armNEONState64: ARMNEONState64 { get throws }
The ARM NEON state of the thread (64-bit).
var armPageInState: arm_pagein_state_t { get throws }
The ARM page-in state of the thread.
var armState32: arm_thread_state32_t { get throws }
The ARM state of the thread (32-bit).
var armState64: arm_thread_state64_t { get throws }
The ARM state of the thread (64-bit).
var armVFPState: arm_vfp_state_t { get throws }
The ARM VFP state of the thread.
var debugState: arm_debug_state64_t { get throws }
The debug state of the thread.
var exceptionState: arm_exception_state64_t { get throws }
The exception state of the thread.
var floatState: arm_vfp_state_t { get throws }
The floating-point state of the thread.
var generalState: arm_thread_state64_t { get throws }
The general state of the thread.
var pageInState: arm_pagein_state_t { get throws }
The page-in state of the thread.
func get<DataType>(_ flavor: Mach.ThreadStateFlavor, as type: DataType.Type = DataType.self) throws -> DataType where DataType : BitwiseCopyable
Gets the state of the thread.
func set<DataType>(_ flavor: Mach.ThreadStateFlavor, to value: DataType) throws where DataType : BitwiseCopyable
Sets the state of the thread.
func setARMDebugState32(to value: arm_debug_state32_t) throws
Sets the ARM debug state of the thread (32-bit).
func setARMDebugState32Legacy(to value: arm_debug_state_t) throws
Sets the legacy (pre-Armv8) ARM debug state of the thread (32-bit).
func setARMDebugState64(to value: arm_debug_state64_t) throws
Sets the ARM debug state of the thread (64-bit).
func setARMExceptionState32(to value: arm_exception_state32_t) throws
Sets the ARM exception state of the thread (32-bit).
func setARMExceptionState64(to value: arm_exception_state64_t) throws
Sets the ARM exception state of the thread (64-bit).
func setARMState32(to value: arm_thread_state32_t) throws
Sets the ARM state of the thread (32-bit).
func setARMState64(to value: arm_thread_state64_t) throws
Sets the ARM state of the thread (64-bit).
func setARMVFPState(to value: arm_vfp_state_t) throws
Sets the ARM VFP state of the thread.
func setDebugState(to value: arm_debug_state64_t) throws
Sets the debug state of the thread.
func setExceptionState(to value: arm_exception_state64_t) throws
Sets the exception state of the thread.
func setGeneralState(to value: arm_thread_state64_t) throws
Sets the general state of the thread.
struct ARMNEONState32
An ARM NEON state of a thread (32-bit).
struct ARMNEONState64
An ARM NEON state of a thread (64-bit).