mirror of
https://github.com/hashicorp/vault.git
synced 2026-06-04 06:15:02 -04:00
Switch Linux over to using the x/sys/unix package
Same syscall interface, but the `x/sys/unix` package is not frozen. No functional change from this commit.
This commit is contained in:
parent
e0412df05d
commit
4b13bfde1d
1 changed files with 6 additions and 2 deletions
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
package mlock
|
||||
|
||||
import "syscall"
|
||||
import (
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func init() {
|
||||
supported = true
|
||||
|
|
@ -10,5 +14,5 @@ func init() {
|
|||
|
||||
func lockMemory() error {
|
||||
// Mlockall prevents all current and future pages from being swapped out.
|
||||
return syscall.Mlockall(syscall.MCL_CURRENT | syscall.MCL_FUTURE)
|
||||
return unix.Mlockall(syscall.MCL_CURRENT | syscall.MCL_FUTURE)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue