]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: small Native Client fixes
authorDave Cheney <dave@cheney.net>
Mon, 10 Mar 2014 19:57:46 +0000 (06:57 +1100)
committerDave Cheney <dave@cheney.net>
Mon, 10 Mar 2014 19:57:46 +0000 (06:57 +1100)
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

src/pkg/runtime/env_posix.c
src/pkg/runtime/mem_nacl.c

index 746c7ee3fde6ff0ba729f2c55f59c579a0b6fde4..4c8288f6b4d8257b13ddefd9e61ae9de8c0377f6 100644 (file)
@@ -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"
index 993d194dd542dd4b4f8726de6c7ed105334fc1cf..b3cf91d7f0e37294438fb29de7b450fa28f74ed3 100644 (file)
@@ -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)
 {