swapExceptionPort(_:)
Swaps an exception port for the host and returns the previous exception ports.
func swapExceptionPort(_ exceptionPort: Mach.ExceptionPort) throws -> [Mach.ExceptionPort]
Swaps an exception port for the host and returns the previous exception ports.
func swapExceptionPort(_ exceptionPort: Mach.ExceptionPort) throws -> [Mach.ExceptionPort]
s8MachCore0A0V4HostC17swapExceptionPortySayAC0eF0CGAHKF
What are these?7M7ON
import MachCore
The core module for interacting with the Mach kernel.
class Host
A host.
struct Mach
The Mach kernel.
class ExceptionPort
An exception port.
static var current: `Self` { get }
The current host.
var bootInfo: String { get throws }
The boot info for the host.
var calendarClock: Mach.Clock { get throws }
The calendar clock (POSIX time).
var exceptionPorts: [Mach.ExceptionPort] { get throws }
All the exception ports for the host.
var hostPort: Mach.Host { get throws }
The unprivileged host port.
var hostPortPrivileged: Mach.Host { get throws }
The privileged host port.
var info: Mach.HostInfoManager { get }
The host’s info.
var isPrivileged: Bool { get throws }
Wether the host port is privileged.
var kernelVersion: String { get throws }
The kernel version for the host.
var lockGroupInfos: [lockgroup_info] { get throws }
Information about the lock groups on the host.
var memoryInfos: [mach_memory_info] { get throws }
The memory infos in the host.
var pageSize: vm_size_t { get throws }
The page size for the host.
var processorSets: [Mach.ProcessorSet] { get throws }
The processor sets in the host.
var processors: [Mach.Processor] { get throws }
The processors in the host.
var statistics: Mach.HostStatisticsManager { get }
The host’s statistics.
var systemClock: Mach.Clock { get throws }
The system clock (uptime).
var zones: [Mach.Zone] { get throws }
The zones in the host.
func addExceptionPort(_ exceptionPort: Mach.ExceptionPort) throws
Adds an exception port to the host.
func clock(_ type: Mach.ClockType) throws -> Mach.Clock
Obtains a clock.
func exceptionPorts(mask: Mach.ExceptionMask) throws -> [Mach.ExceptionPort]
Gets the exception ports for the host that catch the exception types specified by the mask.
func getDefaultMemoryManager() throws -> Mach.MemoryManager
Gets the default memory manager for the host.
func getSpecialPort<PortType>(_ specialPort: Mach.HostSpecialPort, as type: PortType.Type = PortType.self) throws -> PortType where PortType : Mach.Port
Gets a special port for the host.
func kextRequest(_ request: Data) throws -> Data
Performs a kext request.
func kextRequestWithLogging(_ request: Data, logSpec: OSKextLogSpec = 0) throws -> (return: kern_return_t, logData: Data?, response: Data?)
Performs a kext request and returns more information.
func reboot(option: Mach.HostRebootOption = .init(rawValue: 0)) throws
Reboots the host.
func setDefaultMemoryManager(to manager: Mach.MemoryManager) throws
Sets the default memory manager for the host.
func setSpecialPort(_ specialPort: Mach.HostSpecialPort, to port: Mach.Port) throws
Sets a special port for the host.