authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-31 11:12:19-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-31 11:12:19-07:00
log421022929a5b0d8b439796e92beb3acb665f7656
tree366682ef247513cd02d601627036c2bd85bd1d27
parent614ae886dbf72ebf1ed136e278a4bc8c57629237

Revert "std.c: adding cpu affinity api for macOs (mainly x86_64)"

This reverts commit 4bfd37ddb48af4dbfd2e892aec7a90a822c8cbe7.

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

lib/std/c/darwin.zig-20
......@@ -3894,23 +3894,3 @@ pub const MIN = struct {
38943894
38953895pub extern "c" fn mincore(addr: *align(std.mem.page_size) const anyopaque, length: usize, vec: [*]u8) c_int;
38963896pub extern "c" fn os_proc_available_memory() usize;
3897
3898pub const thread_affinity_policy = extern struct {
3899 tag: integer_t,
3900};
3901
3902pub const thread_policy_flavor_t = natural_t;
3903pub const thread_policy_t = [*]integer_t;
3904pub const thread_affinity_policy_data_t = thread_affinity_policy;
3905pub const thread_affinity_policy_t = [*]thread_affinity_policy;
3906
3907pub 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.
3915pub 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;
3916pub 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;