authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-31 11:11:05-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-31 11:11:05-07:00
log614ae886dbf72ebf1ed136e278a4bc8c57629237
treeb0c4cd98d49f1bbd403f4df25236960fbffb4ade
parentafca695b647b37d99bbe1ad69de29d2f3c9c19b0

Revert "std.c: darwin add host_info based data."

This reverts commit ff59c4584041517a2ee07cccf923ef5460032d68.

1 files changed, 0 insertions(+), 86 deletions(-)

lib/std/c/darwin.zig-86
......@@ -3914,89 +3914,3 @@ pub const THREAD_AFFINITY = struct {
39143914/// individual cpus (high performance cpus group and low consumption one), thus the pthread QOS api is more appropriate in this case.
39153915pub 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;
39163916pub 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
3918pub const cpu_type_t = integer_t;
3919pub const cpu_subtype_t = integer_t;
3920pub const cpu_threadtype_t = integer_t;
3921pub const host_flavor_t = integer_t;
3922pub const host_info_t = *integer_t;
3923pub const host_can_has_debugger_info = extern struct {
3924 can_has_debugger: boolean_t,
3925};
3926pub const host_can_has_debugger_info_data_t = host_can_has_debugger_info;
3927pub const host_can_has_debugger_info_t = *host_can_has_debugger_info;
3928
3929pub const host_sched_info = extern struct {
3930 min_timeout: integer_t,
3931 min_quantum: integer_t,
3932};
3933pub const host_sched_info_data_t = host_sched_info;
3934pub const host_sched_info_t = *host_sched_info;
3935
3936pub 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
3944pub const kernel_resource_sizes_data_t = kernel_resource_sizes;
3945pub const kernel_resource_sizes_t = *kernel_resource_sizes;
3946
3947pub 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
3958pub const host_priority_info_data_t = host_priority_info;
3959pub const host_priority_info_t = *host_priority_info;
3960
3961pub const CPU_STATE_MAX = 4;
3962
3963pub const host_cpu_load_info = extern struct {
3964 cpu_ticks: [CPU_STATE_MAX]natural_t,
3965};
3966
3967pub const host_cpu_load_info_data_t = host_cpu_load_info;
3968pub const host_cpu_load_info_t = *host_cpu_load_info;
3969
3970pub 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
3988pub 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
4002pub 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;