commit 421022929a5b0d8b439796e92beb3acb665f7656 (tree)
parent 614ae886dbf72ebf1ed136e278a4bc8c57629237
Author: Andrew Kelley <andrew@ziglang.org>
Date: Mon, 31 Jul 2023 11:12:19 -0700
Revert "std.c: adding cpu affinity api for macOs (mainly x86_64)"
This reverts commit 4bfd37ddb48af4dbfd2e892aec7a90a822c8cbe7.
Diffstat:
1 file changed, 0 insertions(+), 20 deletions(-)
diff --git a/lib/std/c/darwin.zig b/lib/std/c/darwin.zig
@@ -3894,23 +3894,3 @@ pub const MIN = struct {
pub extern "c" fn mincore(addr: *align(std.mem.page_size) const anyopaque, length: usize, vec: [*]u8) c_int;
pub extern "c" fn os_proc_available_memory() usize;
-
-pub const thread_affinity_policy = extern struct {
- tag: integer_t,
-};
-
-pub const thread_policy_flavor_t = natural_t;
-pub const thread_policy_t = [*]integer_t;
-pub const thread_affinity_policy_data_t = thread_affinity_policy;
-pub const thread_affinity_policy_t = [*]thread_affinity_policy;
-
-pub const THREAD_AFFINITY = struct {
- pub const POLICY = 0;
- pub const POLICY_COUNT = @as(mach_msg_type_number_t, @intCast(@sizeOf(thread_affinity_policy_data_t) / @sizeOf(integer_t)));
-};
-
-/// cpu affinity api
-/// albeit it is also available on arm64, it always fails as in this architecture there is no sense of
-/// individual cpus (high performance cpus group and low consumption one), thus the pthread QOS api is more appropriate in this case.
-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;
-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;