Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
79dcf180
Commit
79dcf180
authored
Dec 07, 2010
by
Andrew Gerrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: fix build for nacl
R=lvd CC=golang-dev
https://golang.org/cl/3391044
parent
f503e263
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
closure.c
src/pkg/runtime/nacl/386/closure.c
+5
-5
No files found.
src/pkg/runtime/nacl/386/closure.c
View file @
79dcf180
...
...
@@ -38,7 +38,7 @@
#include "malloc.h"
// NaCl system call to copy data into text segment.
extern
int32
dyncode_copy
(
void
*
,
void
*
,
int32
);
extern
int32
runtime
·
dyncode_copy
(
void
*
,
void
*
,
int32
);
enum
{
// Allocate chunks of 4096 bytes worth of closures:
...
...
@@ -168,8 +168,8 @@ runtime·closure(int32 siz, byte *fn, byte *arg0)
// segment and beginning of data.
clos
.
code
=
(
byte
*
)(((
uintptr
)
etext
+
65535
)
&
~
65535
);
clos
.
ecode
=
clos
.
code
;
mheap
.
closure_min
=
clos
.
code
;
mheap
.
closure_max
=
rodata
;
runtime
·
mheap
.
closure_min
=
clos
.
code
;
runtime
·
mheap
.
closure_max
=
rodata
;
}
if
(
clos
.
ecode
+
ClosureChunk
>
rodata
)
{
// Last ditch effort: garbage collect and hope.
...
...
@@ -218,7 +218,7 @@ runtime·closure(int32 siz, byte *fn, byte *arg0)
e
=
runtime
·
dyncode_copy
(
clos
.
ecode
,
clos
.
buf
,
ClosureChunk
);
if
(
e
!=
0
)
{
fd
=
2
;
runtime
·
fd
=
2
;
if
(
e
==
-
22
)
runtime
·
throw
(
"NaCl running with dyncode_copy disabled; export NACLDYNCODE=1 in your environment"
);
runtime
·
printf
(
"dyncode_copy: error %d
\n
"
,
e
);
...
...
@@ -240,7 +240,7 @@ alloc:
d
->
siz
=
siz
;
runtime
·
mcpy
((
byte
*
)(
d
+
1
),
(
byte
*
)
&
arg0
,
siz
);
*
codeptr
(
p
)
=
d
;
runtime
·
addfinalizer
(
f
,
finclosure
,
0
);
runtime
·
addfinalizer
(
f
,
runtime
·
finclosure
,
0
);
runtime
·
unlock
(
&
clos
);
*
ret
=
p
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment