mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
Bpf: move under os/linux instead of bits (#6126)
* moved bpf syscall, added some bpf instructions and tests * had to move bpf out of bits so that a freestanding target could import it * removed line * fixed imports
This commit is contained in:
parent
9605e5363b
commit
0fa3cfdb4a
@ -24,7 +24,6 @@ pub usingnamespace switch (builtin.arch) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pub usingnamespace @import("linux/netlink.zig");
|
pub usingnamespace @import("linux/netlink.zig");
|
||||||
pub const BPF = @import("linux/bpf.zig");
|
|
||||||
|
|
||||||
const is_mips = builtin.arch.isMIPS();
|
const is_mips = builtin.arch.isMIPS();
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,7 @@ pub usingnamespace switch (builtin.arch) {
|
|||||||
};
|
};
|
||||||
pub usingnamespace @import("bits.zig");
|
pub usingnamespace @import("bits.zig");
|
||||||
pub const tls = @import("linux/tls.zig");
|
pub const tls = @import("linux/tls.zig");
|
||||||
|
pub const BPF = @import("linux/bpf.zig");
|
||||||
|
|
||||||
/// Set by startup code, used by `getauxval`.
|
/// Set by startup code, used by `getauxval`.
|
||||||
pub var elf_aux_maybe: ?[*]std.elf.Auxv = null;
|
pub var elf_aux_maybe: ?[*]std.elf.Auxv = null;
|
||||||
|
|||||||
@ -4,10 +4,8 @@
|
|||||||
// The MIT license requires this copyright notice to be included in all copies
|
// The MIT license requires this copyright notice to be included in all copies
|
||||||
// and substantial portions of the software.
|
// and substantial portions of the software.
|
||||||
usingnamespace std.os;
|
usingnamespace std.os;
|
||||||
const std = @import("../../../std.zig");
|
const std = @import("../../std.zig");
|
||||||
const expectEqual = std.testing.expectEqual;
|
const expectEqual = std.testing.expectEqual;
|
||||||
const fd_t = std.os.fd_t;
|
|
||||||
const pid_t = std.os.pid_t;
|
|
||||||
|
|
||||||
// instruction classes
|
// instruction classes
|
||||||
pub const LD = 0x00;
|
pub const LD = 0x00;
|
||||||
Loading…
x
Reference in New Issue
Block a user