From 4b13bfde1d9d1e5e49aeecb78f6455dfea2250ce Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Tue, 5 Apr 2016 12:19:46 -0700 Subject: [PATCH] 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. --- helper/mlock/mlock_linux.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/helper/mlock/mlock_linux.go b/helper/mlock/mlock_linux.go index 91222021de..38055bd58f 100644 --- a/helper/mlock/mlock_linux.go +++ b/helper/mlock/mlock_linux.go @@ -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) }