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 ThreadPolicyManager
A thread policy manager.
struct Mach
The Mach kernel.
class Thread
A thread in a task.
init(thread: Mach.Thread)
Creates a thread policy manager.
var affinityPolicy: thread_affinity_policy { get throws }
The thread’s affinity policy.
var extendedPolicy: thread_extended_policy { get throws }
The thread’s extended policy.
var latencyQoSPolicy: thread_latency_qos_policy { get throws }
The thread’s latency QoS policy.
var policyState: thread_policy_state { get throws }
The thread’s policy state.
var precedencePolicy: thread_precedence_policy { get throws }
The thread’s precedence policy.
var qosPolicy: thread_qos_policy { get throws }
The thread’s QoS policy.
var requestedQoSPolicy: thread_requested_qos_policy { get throws }
The thread’s requested QoS policy.
var throughputQoSPolicy: thread_throughput_qos_policy { get throws }
The thread’s throughput QoS policy.
var timeConstraintPolicy: thread_time_constraint_policy { get throws }
The thread’s time constraint policy.
var timeConstraintWithPriorityPolicy: thread_time_constraint_with_priority_policy { get throws }
The thread’s time constraint policy (with a priority field).
func get<DataType>(_ flavor: Mach.ThreadPolicyFlavor, as type: DataType.Type = DataType.self) throws -> DataType where DataType : BitwiseCopyable
Gets the thread’s policy.
func set<DataType>(_ flavor: Mach.ThreadPolicyFlavor, to value: DataType) throws where DataType : BitwiseCopyable
Sets the thread’s policy.
func setAffinityPolicy(to affinityPolicy: thread_affinity_policy) throws
Sets the thread’s affinity policy.
func setExtendedPolicy(to extendedPolicy: thread_extended_policy) throws
Sets the thread’s extended policy.
func setLatencyQoSPolicy(to latencyQoSPolicy: thread_latency_qos_policy) throws
Sets the thread’s latency QoS policy.
func setPrecedencePolicy(to precedencePolicy: thread_precedence_policy) throws
Sets the thread’s precedence policy.
func setQoSPolicy(to qosPolicy: thread_qos_policy) throws
Sets the thread’s QoS policy.
func setThroughputQoSPolicy(to throughputQoSPolicy: thread_throughput_qos_policy) throws
Sets the thread’s throughput QoS policy.
func setTimeConstraintPolicy(to timeConstraintPolicy: thread_time_constraint_policy) throws
Sets the thread’s time constraint policy.
func setTimeConstraintWithPriorityPolicy(to timeConstraintWithPriorityPolicy: thread_time_constraint_with_priority_policy) throws
Sets the thread’s time constraint policy (with a priority field).