authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-31 11:14:03-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-31 11:14:03-07:00
logf96f57930c65bedc00fb484a90b3c3932387982e
tree4e1cb248c12efe5efcfe69c59f977d74613985ad
parenta397952932989d5a921b71e133141a2bc1f231d2

Revert "std.c: adding freebsd's CPU_COUNT macro portage."

This reverts commit b9841750f91604020268549fc5e2c6b10c1f8477.

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

lib/std/c/freebsd.zig-14
......@@ -9,20 +9,6 @@ pub const CPU_SETSIZE = 256;
99pub const cpuset_t = extern struct {
1010 __bits: [(CPU_SETSIZE + (@bitSizeOf(c_long) - 1)) / @bitSizeOf(c_long)]c_long,
1111};
12
13// TODO: can eventually serve for the domainset_t's type too.
14fn __BIT_COUNT(bits: []const c_long) c_long {
15 var count: c_long = 0;
16 for (bits) |b| {
17 count += @popCount(b);
18 }
19 return count;
20}
21
22pub fn CPU_COUNT(set: cpuset_t) c_int {
23 return @as(c_int, @intCast(__BIT_COUNT(set.__bits[0..])));
24}
25
2612pub const cpulevel_t = c_int;
2713pub const cpuwhich_t = c_int;
2814pub const id_t = i64;