| ... | @@ -3914,89 +3914,3 @@ pub const THREAD_AFFINITY = struct { | ... | @@ -3914,89 +3914,3 @@ pub const THREAD_AFFINITY = struct { |
| 3914 | /// individual cpus (high performance cpus group and low consumption one), thus the pthread QOS api is more appropriate in this case. | 3914 | /// individual cpus (high performance cpus group and low consumption one), thus the pthread QOS api is more appropriate in this case. |
| 3915 | pub extern "c" fn thread_affinity_get(thread: thread_act_t, flavor: thread_policy_flavor_t, info: thread_policy_t, infocnt: [*]mach_msg_type_number_t, default: *boolean_t) kern_return_t; | 3915 | pub extern "c" fn thread_affinity_get(thread: thread_act_t, flavor: thread_policy_flavor_t, info: thread_policy_t, infocnt: [*]mach_msg_type_number_t, default: *boolean_t) kern_return_t; |
| 3916 | pub extern "c" fn thread_affinity_set(thread: thread_act_t, flavor: thread_policy_flavor_t, info: thread_policy_t, infocnt: mach_msg_type_number_t) kern_return_t; | 3916 | pub extern "c" fn thread_affinity_set(thread: thread_act_t, flavor: thread_policy_flavor_t, info: thread_policy_t, infocnt: mach_msg_type_number_t) kern_return_t; |
| 3917 | | | |
| 3918 | pub const cpu_type_t = integer_t; | | |
| 3919 | pub const cpu_subtype_t = integer_t; | | |
| 3920 | pub const cpu_threadtype_t = integer_t; | | |
| 3921 | pub const host_flavor_t = integer_t; | | |
| 3922 | pub const host_info_t = *integer_t; | | |
| 3923 | pub const host_can_has_debugger_info = extern struct { | | |
| 3924 | can_has_debugger: boolean_t, | | |
| 3925 | }; | | |
| 3926 | pub const host_can_has_debugger_info_data_t = host_can_has_debugger_info; | | |
| 3927 | pub const host_can_has_debugger_info_t = *host_can_has_debugger_info; | | |
| 3928 | | | |
| 3929 | pub const host_sched_info = extern struct { | | |
| 3930 | min_timeout: integer_t, | | |
| 3931 | min_quantum: integer_t, | | |
| 3932 | }; | | |
| 3933 | pub const host_sched_info_data_t = host_sched_info; | | |
| 3934 | pub const host_sched_info_t = *host_sched_info; | | |
| 3935 | | | |
| 3936 | pub const kernel_resource_sizes = extern struct { | | |
| 3937 | task: natural_t, | | |
| 3938 | thread: natural_t, | | |
| 3939 | port: natural_t, | | |
| 3940 | memory_region: natural_t, | | |
| 3941 | memory_object: natural_t, | | |
| 3942 | }; | | |
| 3943 | | | |
| 3944 | pub const kernel_resource_sizes_data_t = kernel_resource_sizes; | | |
| 3945 | pub const kernel_resource_sizes_t = *kernel_resource_sizes; | | |
| 3946 | | | |
| 3947 | pub const host_priority_info = extern struct { | | |
| 3948 | kernel_priority: integer_t, | | |
| 3949 | system_priority: integer_t, | | |
| 3950 | server_priority: integer_t, | | |
| 3951 | user_priority: integer_t, | | |
| 3952 | depress_priority: integer_t, | | |
| 3953 | idle_priority: integer_t, | | |
| 3954 | minimum_priority: integer_t, | | |
| 3955 | maximum_priority: integer_t, | | |
| 3956 | }; | | |
| 3957 | | | |
| 3958 | pub const host_priority_info_data_t = host_priority_info; | | |
| 3959 | pub const host_priority_info_t = *host_priority_info; | | |
| 3960 | | | |
| 3961 | pub const CPU_STATE_MAX = 4; | | |
| 3962 | | | |
| 3963 | pub const host_cpu_load_info = extern struct { | | |
| 3964 | cpu_ticks: [CPU_STATE_MAX]natural_t, | | |
| 3965 | }; | | |
| 3966 | | | |
| 3967 | pub const host_cpu_load_info_data_t = host_cpu_load_info; | | |
| 3968 | pub const host_cpu_load_info_t = *host_cpu_load_info; | | |
| 3969 | | | |
| 3970 | pub const HOST = struct { | | |
| 3971 | pub const BASIC_INFO = 1; | | |
| 3972 | pub const SCHED_INFO = 3; | | |
| 3973 | pub const RESOURCE_SIZES = 4; | | |
| 3974 | pub const PRIORITY_INFO = 5; | | |
| 3975 | pub const SEMAPHORE_TRAPS = 7; | | |
| 3976 | pub const MACH_MSG_TRAPS = 8; | | |
| 3977 | pub const VM_PURGEABLE = 9; | | |
| 3978 | pub const DEBUG_INFO_INTERNAL = 10; | | |
| 3979 | pub const CAN_HAS_DEBUGGER = 11; | | |
| 3980 | pub const PREFERRED_USER_ARCH = 12; | | |
| 3981 | pub const CAN_HAS_DEBUGGER_COUNT = @intCast(mach_msg_type_number_t, @sizeOf(host_can_has_debugger_info_data_t) / @sizeOf(integer_t)); | | |
| 3982 | pub const SCHED_INFO_COUNT = @intCast(mach_msg_type_number_t, @sizeOf(host_sched_info_data_t) / @sizeOf(integer_t)); | | |
| 3983 | pub const RESOURCES_SIZES_COUNT = @intCast(mach_msg_type_number_t, @sizeOf(kernel_resource_sizes_data_t) / @sizeOf(integer_t)); | | |
| 3984 | pub const PRIORITY_INFO_COUNT = @intCast(mach_msg_type_number_t, @sizeOf(host_priority_info_data_t) / @sizeOf(integer_t)); | | |
| 3985 | pub const CPU_LOAD_INFO_COUNT = @intCast(mach_msg_type_number_t, @sizeOf(host_cpu_load_info_data_t) / @sizeOf(integer_t)); | | |
| 3986 | }; | | |
| 3987 | | | |
| 3988 | pub const host_basic_info = packed struct(u32) { | | |
| 3989 | max_cpus: integer_t, | | |
| 3990 | avail_cpus: integer_t, | | |
| 3991 | memory_size: natural_t, | | |
| 3992 | cpu_type: cpu_type_t, | | |
| 3993 | cpu_subtype: cpu_subtype_t, | | |
| 3994 | cpu_threadtype: cpu_threadtype_t, | | |
| 3995 | physical_cpu: integer_t, | | |
| 3996 | physical_cpu_max: integer_t, | | |
| 3997 | logical_cpu: integer_t, | | |
| 3998 | logical_cpu_max: integer_t, | | |
| 3999 | max_mem: u64, | | |
| 4000 | }; | | |
| 4001 | | | |
| 4002 | pub extern "c" fn host_info(host: host_t, flavor: host_flavor_t, info_out: host_info_t, info_outCnt: [*]mach_msg_type_number_t) kern_return_t; | | |