Skip to content

Commit

Permalink
Merge branch 'master' into memcpy-memset
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Apr 14, 2023
2 parents 0c43070 + b42562b commit 16b194d
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 202 deletions.
35 changes: 35 additions & 0 deletions lib/std/c/freebsd.zig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub extern "c" fn malloc_usable_size(?*const anyopaque) usize;
pub extern "c" fn getpid() pid_t;

pub extern "c" fn kinfo_getfile(pid: pid_t, cntp: *c_int) ?[*]kinfo_file;
pub extern "c" fn kinfo_getvmmap(pid: pid_t, cntp: *c_int) ?[*]kinfo_vmentry;

pub const sf_hdtr = extern struct {
headers: [*]const iovec_const,
Expand Down Expand Up @@ -565,6 +566,40 @@ comptime {
std.debug.assert(@alignOf(kinfo_file) == @sizeOf(u64));
}

pub const kinfo_vmentry = extern struct {
kve_structsize: c_int,
kve_type: c_int,
kve_start: u64,
kve_end: u64,
kve_offset: u64,
kve_vn_fileid: u64,
kve_vn_fsid_freebsd11: u32,
kve_flags: c_int,
kve_resident: c_int,
kve_private_resident: c_int,
kve_protection: c_int,
kve_ref_count: c_int,
kve_shadow_count: c_int,
kve_vn_type: c_int,
kve_vn_size: u64,
kve_vn_rdev_freebsd11: u32,
kve_vn_mode: u16,
kve_status: u16,
kve_type_spec: extern union {
_kve_vn_fsid: u64,
_kve_obj: u64,
},
kve_vn_rdev: u64,
_kve_ispare: [8]c_int,
kve_rpath: [PATH_MAX]u8,
};

pub const KINFO_VMENTRY_SIZE = 1160;

comptime {
std.debug.assert(@sizeOf(kinfo_vmentry) == KINFO_VMENTRY_SIZE);
}

pub const CTL = struct {
pub const KERN = 1;
pub const DEBUG = 5;
Expand Down
1 change: 1 addition & 0 deletions lib/std/c/solaris.zig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) usize;
pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int;
pub extern "c" fn pipe2(fds: *[2]fd_t, flags: u32) c_int;
pub extern "c" fn arc4random_buf(buf: [*]u8, len: usize) void;
pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize;
pub extern "c" fn posix_memalign(memptr: *?*anyopaque, alignment: usize, size: usize) c_int;
pub extern "c" fn sysconf(sc: c_int) i64;
pub extern "c" fn signalfd(fd: fd_t, mask: *const sigset_t, flags: u32) c_int;
Expand Down
2 changes: 2 additions & 0 deletions lib/std/crypto.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ const root = @import("root");
pub const aead = struct {
pub const aegis = struct {
pub const Aegis128L = @import("crypto/aegis.zig").Aegis128L;
pub const Aegis128L_256 = @import("crypto/aegis.zig").Aegis128L_256;
pub const Aegis256 = @import("crypto/aegis.zig").Aegis256;
pub const Aegis256_256 = @import("crypto/aegis.zig").Aegis256_256;
};

pub const aes_gcm = struct {
Expand Down
Loading

0 comments on commit 16b194d

Please sign in to comment.