| ... | @@ -3894,23 +3894,3 @@ pub const MIN = struct { | ... | @@ -3894,23 +3894,3 @@ pub const MIN = struct { |
| 3894 | | 3894 | |
| 3895 | pub extern "c" fn mincore(addr: *align(std.mem.page_size) const anyopaque, length: usize, vec: [*]u8) c_int; | 3895 | pub extern "c" fn mincore(addr: *align(std.mem.page_size) const anyopaque, length: usize, vec: [*]u8) c_int; |
| 3896 | pub extern "c" fn os_proc_available_memory() usize; | 3896 | pub extern "c" fn os_proc_available_memory() usize; |
| 3897 | | | |
| 3898 | pub const thread_affinity_policy = extern struct { | | |
| 3899 | tag: integer_t, | | |
| 3900 | }; | | |
| 3901 | | | |
| 3902 | pub const thread_policy_flavor_t = natural_t; | | |
| 3903 | pub const thread_policy_t = [*]integer_t; | | |
| 3904 | pub const thread_affinity_policy_data_t = thread_affinity_policy; | | |
| 3905 | pub const thread_affinity_policy_t = [*]thread_affinity_policy; | | |
| 3906 | | | |
| 3907 | pub const THREAD_AFFINITY = struct { | | |
| 3908 | pub const POLICY = 0; | | |
| 3909 | pub const POLICY_COUNT = @as(mach_msg_type_number_t, @intCast(@sizeOf(thread_affinity_policy_data_t) / @sizeOf(integer_t))); | | |
| 3910 | }; | | |
| 3911 | | | |
| 3912 | /// cpu affinity api | | |
| 3913 | /// albeit it is also available on arm64, it always fails as in this architecture there is no sense of | | |
| 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; | | |
| 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; | | |