diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-12-18 23:57:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-18 23:57:46 -0500 |
| commit | 506af7e52e0985b410ea089bf5fa3247ab2377cb (patch) | |
| tree | 2ec26d70f41a1382b736b606ebfa094ace62573e /lib/std/os/linux.zig | |
| parent | ce65533985caa9e2da567948e36d7d4ba0185005 (diff) | |
| parent | f416535768fc30195cad6cd481f73fd1e80082aa (diff) | |
| download | zig-506af7e52e0985b410ea089bf5fa3247ab2377cb.tar.gz zig-506af7e52e0985b410ea089bf5fa3247ab2377cb.zip | |
Merge pull request #7482 from ziglang/tlcsprng
std: introduce a thread-local CSPRNG for general use
Diffstat (limited to 'lib/std/os/linux.zig')
| -rw-r--r-- | lib/std/os/linux.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index f840f6a255..f252a08fc9 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -1351,6 +1351,10 @@ pub fn prlimit(pid: pid_t, resource: rlimit_resource, new_limit: ?*const rlimit, ); } +pub fn madvise(address: [*]u8, len: usize, advice: u32) usize { + return syscall3(.madvise, @ptrToInt(address), len, advice); +} + test "" { if (builtin.os.tag == .linux) { _ = @import("linux/test.zig"); |
