aboutsummaryrefslogtreecommitdiff
path: root/src/pkg
diff options
context:
space:
mode:
authorDave Cheney <dave@cheney.net>2014-03-11 06:57:46 +1100
committerDave Cheney <dave@cheney.net>2014-03-11 06:57:46 +1100
commit9ab4d1d6b3d90cc4837edae0b5857dae33e79ebd (patch)
tree18bf30205e856272de6f86e611e248c9c7643479 /src/pkg
parentf9a408c1d97c8180aa2488ea9e3c47a319c3ddba (diff)
downloadgo-9ab4d1d6b3d90cc4837edae0b5857dae33e79ebd.tar.xz
runtime: small Native Client fixes
mem_nacl.c: add SysFault env_posix.c: add nacl to build tag, from CL 15790043 LGTM=remyoudompheng, iant R=rsc, remyoudompheng, iant CC=golang-codereviews https://golang.org/cl/72780043
Diffstat (limited to 'src/pkg')
-rw-r--r--src/pkg/runtime/env_posix.c2
-rw-r--r--src/pkg/runtime/mem_nacl.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/pkg/runtime/env_posix.c b/src/pkg/runtime/env_posix.c
index 746c7ee3fd..4c8288f6b4 100644
--- a/src/pkg/runtime/env_posix.c
+++ b/src/pkg/runtime/env_posix.c
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
+// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
#include "runtime.h"
#include "arch_GOARCH.h"
diff --git a/src/pkg/runtime/mem_nacl.c b/src/pkg/runtime/mem_nacl.c
index 993d194dd5..b3cf91d7f0 100644
--- a/src/pkg/runtime/mem_nacl.c
+++ b/src/pkg/runtime/mem_nacl.c
@@ -53,6 +53,12 @@ runtime·SysFree(void *v, uintptr n, uint64 *stat)
runtime·munmap(v, n);
}
+void
+runtime·SysFault(void *v, uintptr n)
+{
+ runtime·mmap(v, n, PROT_NONE, 0, -1, 0);
+}
+
void*
runtime·SysReserve(void *v, uintptr n)
{