# Add mlock syscalls to std.c and std.posix · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/8248597a2726663a89e31896f0e9751db5b9db82)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 8248597a2726663a89e31896f0e9751db5b9db82

Requested commit: 8248597a2726663a89e31896f0e9751db5b9db82

Commit: 8248597a2726663a89e31896f0e9751db5b9db82

Tree: f7d70d0dadad659f801a5c75b40e85a6513f7c51

Author: Brandon Black

Committer: Alex Rønne Petersen

## Message

```
Add mlock syscalls to std.c and std.posix

Linux already gained the relevant syscalls and consts in #24473

The basic mlock() and munlock() are fairly universal across the
*nix world with a consistent interface, but are missing on wasi
and windows.

The mlockall() and munlockall() calls are not as widely supported
as the basic ones.  Notable non-implementers include darwin,
haiku, and serenity (and of course wasi and windows again).

mlock2() is Linux-only, as are its MLOCK flags.

```

## Parents

- [172e97154de214fd3f4ecf1753382fb687f9b4ab](https://git.cafe/gitcafe/zig/commit/172e97154de214fd3f4ecf1753382fb687f9b4ab?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/8248597a2726663a89e31896f0e9751db5b9db82?format=markdown)
