mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 14:59:14 +00:00
Revert "std.c: adding freebsd's domainset_t bitset"
This reverts commit 10a7cf58c1530e004e5ccb1a81f02aa86ab51dd1.
This commit is contained in:
parent
ac7be71d8e
commit
a048ddaf91
@ -10,6 +10,7 @@ pub const cpuset_t = extern struct {
|
||||
__bits: [(CPU_SETSIZE + (@bitSizeOf(c_long) - 1)) / @bitSizeOf(c_long)]c_long,
|
||||
};
|
||||
|
||||
// TODO: can eventually serve for the domainset_t's type too.
|
||||
fn __BIT_COUNT(bits: []const c_long) c_long {
|
||||
var count: c_long = 0;
|
||||
for (bits) |b| {
|
||||
@ -2562,18 +2563,8 @@ pub const DOMAINSET = struct {
|
||||
pub const POLICY_MAX = DOMAINSET.POLICY_INTERLEAVE;
|
||||
};
|
||||
|
||||
pub const DOMAINSET_SIZE = 256;
|
||||
pub const domainset_t = extern struct {
|
||||
__bits: [(DOMAINSET_SIZE + (@sizeOf(domainset) - 1)) / @bitSizeOf(domainset)]domainset,
|
||||
};
|
||||
|
||||
pub fn DOMAINSET_COUNT(set: domainset_t) c_int {
|
||||
return @as(c_int, @intCast(__BIT_COUNT(set.__bits[0..])));
|
||||
}
|
||||
|
||||
pub const domainset = extern struct {
|
||||
link: LIST_ENTRY,
|
||||
mask: domainset_t,
|
||||
policy: u16,
|
||||
prefer: domainid_t,
|
||||
cnt: domainid_t,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user