mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
Revert "std.c: adding cpu affinity api for macOs (mainly x86_64)"
This reverts commit 4bfd37ddb48af4dbfd2e892aec7a90a822c8cbe7.
This commit is contained in:
parent
614ae886db
commit
421022929a
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user