Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
66e34643
Commit
66e34643
authored
Mar 12, 2013
by
Keith Randall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: Fix plan9 aes hash initialization.
R=golang-dev, r CC=golang-dev
https://golang.org/cl/7593045
parent
9dfcfb93
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
src/pkg/runtime/env_plan9.c
src/pkg/runtime/env_plan9.c
+1
-1
src/pkg/runtime/os_plan9.h
src/pkg/runtime/os_plan9.h
+0
-3
src/pkg/runtime/thread_plan9.c
src/pkg/runtime/thread_plan9.c
+10
-3
No files found.
src/pkg/runtime/env_plan9.c
View file @
66e34643
...
@@ -20,7 +20,7 @@ runtime·getenv(int8 *s)
...
@@ -20,7 +20,7 @@ runtime·getenv(int8 *s)
runtime
·
memmove
((
void
*
)
file
,
(
void
*
)
"/env/"
,
5
);
runtime
·
memmove
((
void
*
)
file
,
(
void
*
)
"/env/"
,
5
);
runtime
·
memmove
((
void
*
)(
file
+
5
),
(
void
*
)
s
,
len
);
runtime
·
memmove
((
void
*
)(
file
+
5
),
(
void
*
)
s
,
len
);
fd
=
runtime
·
open
(
file
,
OREAD
);
fd
=
runtime
·
open
(
(
int8
*
)
file
,
OREAD
,
0
);
if
(
fd
<
0
)
if
(
fd
<
0
)
return
nil
;
return
nil
;
n
=
runtime
·
seek
(
fd
,
0
,
2
);
n
=
runtime
·
seek
(
fd
,
0
,
2
);
...
...
src/pkg/runtime/os_plan9.h
View file @
66e34643
...
@@ -3,12 +3,9 @@
...
@@ -3,12 +3,9 @@
// license that can be found in the LICENSE file.
// license that can be found in the LICENSE file.
// Plan 9-specific system calls
// Plan 9-specific system calls
int32
runtime
·
open
(
uint8
*
file
,
int32
mode
);
int32
runtime
·
pread
(
int32
fd
,
void
*
buf
,
int32
nbytes
,
int64
offset
);
int32
runtime
·
pread
(
int32
fd
,
void
*
buf
,
int32
nbytes
,
int64
offset
);
int32
runtime
·
pwrite
(
int32
fd
,
void
*
buf
,
int32
nbytes
,
int64
offset
);
int32
runtime
·
pwrite
(
int32
fd
,
void
*
buf
,
int32
nbytes
,
int64
offset
);
int32
runtime
·
read
(
int32
fd
,
void
*
buf
,
int32
nbytes
);
int64
runtime
·
seek
(
int32
fd
,
int64
offset
,
int32
whence
);
int64
runtime
·
seek
(
int32
fd
,
int64
offset
,
int32
whence
);
int32
runtime
·
close
(
int32
fd
);
void
runtime
·
exits
(
int8
*
msg
);
void
runtime
·
exits
(
int8
*
msg
);
intptr
runtime
·
brk_
(
void
*
);
intptr
runtime
·
brk_
(
void
*
);
int32
runtime
·
sleep
(
int32
ms
);
int32
runtime
·
sleep
(
int32
ms
);
...
...
src/pkg/runtime/thread_plan9.c
View file @
66e34643
...
@@ -48,7 +48,7 @@ getproccount(void)
...
@@ -48,7 +48,7 @@ getproccount(void)
int32
fd
,
i
,
n
,
ncpu
;
int32
fd
,
i
,
n
,
ncpu
;
byte
buf
[
2048
];
byte
buf
[
2048
];
fd
=
runtime
·
open
(
(
byte
*
)
"/dev/sysstat"
,
OREAD
);
fd
=
runtime
·
open
(
"/dev/sysstat"
,
OREAD
,
0
);
if
(
fd
<
0
)
if
(
fd
<
0
)
return
1
;
return
1
;
ncpu
=
0
;
ncpu
=
0
;
...
@@ -72,7 +72,7 @@ getpid(void)
...
@@ -72,7 +72,7 @@ getpid(void)
int32
fd
;
int32
fd
;
runtime
·
memclr
(
b
,
sizeof
(
b
));
runtime
·
memclr
(
b
,
sizeof
(
b
));
fd
=
runtime
·
open
(
(
byte
*
)
"#c/pid"
,
0
);
fd
=
runtime
·
open
(
"#c/pid"
,
0
,
0
);
if
(
fd
>=
0
)
{
if
(
fd
>=
0
)
{
runtime
·
read
(
fd
,
b
,
sizeof
(
b
));
runtime
·
read
(
fd
,
b
,
sizeof
(
b
));
runtime
·
close
(
fd
);
runtime
·
close
(
fd
);
...
@@ -91,6 +91,13 @@ runtime·osinit(void)
...
@@ -91,6 +91,13 @@ runtime·osinit(void)
runtime
·
notify
(
runtime
·
sigtramp
);
runtime
·
notify
(
runtime
·
sigtramp
);
}
}
void
runtime
·
get_random_data
(
byte
**
rnd
,
int32
*
rnd_len
)
{
*
rnd
=
nil
;
*
rnd_len
=
0
;
}
void
void
runtime
·
goenvs
(
void
)
runtime
·
goenvs
(
void
)
{
{
...
@@ -195,7 +202,7 @@ runtime·postnote(int32 pid, int8* msg)
...
@@ -195,7 +202,7 @@ runtime·postnote(int32 pid, int8* msg)
p
--
;
p
--
;
runtime
·
memmove
((
void
*
)
p
,
(
void
*
)
"/note"
,
5
);
runtime
·
memmove
((
void
*
)
p
,
(
void
*
)
"/note"
,
5
);
fd
=
runtime
·
open
(
buf
,
OWRITE
);
fd
=
runtime
·
open
(
(
int8
*
)
buf
,
OWRITE
,
0
);
if
(
fd
<
0
)
if
(
fd
<
0
)
return
-
1
;
return
-
1
;
...
...
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