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
087a3486
Commit
087a3486
authored
Nov 16, 2011
by
Lucio De Re
Committed by
Russ Cox
Nov 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syscall, os, time: fix Plan 9 build
R=rsc, bradfitz CC=golang-dev
https://golang.org/cl/5371092
parent
8fdd6c05
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
58 deletions
+53
-58
src/pkg/os/error_plan9.go
src/pkg/os/error_plan9.go
+1
-1
src/pkg/os/file_plan9.go
src/pkg/os/file_plan9.go
+7
-7
src/pkg/os/stat_plan9.go
src/pkg/os/stat_plan9.go
+1
-1
src/pkg/syscall/exec_plan9.go
src/pkg/syscall/exec_plan9.go
+8
-8
src/pkg/syscall/syscall_plan9.go
src/pkg/syscall/syscall_plan9.go
+18
-18
src/pkg/syscall/zsyscall_plan9_386.go
src/pkg/syscall/zsyscall_plan9_386.go
+18
-18
src/pkg/time/sys_plan9.go
src/pkg/time/sys_plan9.go
+0
-5
No files found.
src/pkg/os/error_plan9.go
View file @
087a3486
...
...
@@ -24,7 +24,7 @@ func (e *SyscallError) Error() string { return e.Syscall + ": " + e.Err }
// NewSyscallError returns, as an error, a new SyscallError
// with the given system call name and error details.
// As a convenience, if err is nil, NewSyscallError returns nil.
func
NewSyscallError
(
syscall
string
,
err
syscall
.
E
rror
)
error
{
func
NewSyscallError
(
syscall
string
,
err
e
rror
)
error
{
if
err
==
nil
{
return
nil
}
...
...
src/pkg/os/file_plan9.go
View file @
087a3486
...
...
@@ -64,7 +64,7 @@ const DevNull = "/dev/null"
func
OpenFile
(
name
string
,
flag
int
,
perm
uint32
)
(
file
*
File
,
err
error
)
{
var
(
fd
int
e
syscall
.
E
rror
e
e
rror
create
bool
excl
bool
trunc
bool
...
...
@@ -93,7 +93,7 @@ func OpenFile(name string, flag int, perm uint32) (file *File, err error) {
}
else
{
fd
,
e
=
syscall
.
Open
(
name
,
flag
)
if
e
!=
nil
&&
create
{
var
e1
syscall
.
E
rror
var
e1
e
rror
fd
,
e1
=
syscall
.
Create
(
name
,
flag
,
perm
)
if
e1
==
nil
{
e
=
nil
...
...
@@ -199,26 +199,26 @@ func (f *File) Sync() (err error) {
// read reads up to len(b) bytes from the File.
// It returns the number of bytes read and an error, if any.
func
(
f
*
File
)
read
(
b
[]
byte
)
(
n
int
,
err
syscall
.
E
rror
)
{
func
(
f
*
File
)
read
(
b
[]
byte
)
(
n
int
,
err
e
rror
)
{
return
syscall
.
Read
(
f
.
fd
,
b
)
}
// pread reads len(b) bytes from the File starting at byte offset off.
// It returns the number of bytes read and the error, if any.
// EOF is signaled by a zero count with err set to nil.
func
(
f
*
File
)
pread
(
b
[]
byte
,
off
int64
)
(
n
int
,
err
syscall
.
E
rror
)
{
func
(
f
*
File
)
pread
(
b
[]
byte
,
off
int64
)
(
n
int
,
err
e
rror
)
{
return
syscall
.
Pread
(
f
.
fd
,
b
,
off
)
}
// write writes len(b) bytes to the File.
// It returns the number of bytes written and an error, if any.
func
(
f
*
File
)
write
(
b
[]
byte
)
(
n
int
,
err
syscall
.
E
rror
)
{
func
(
f
*
File
)
write
(
b
[]
byte
)
(
n
int
,
err
e
rror
)
{
return
syscall
.
Write
(
f
.
fd
,
b
)
}
// pwrite writes len(b) bytes to the File starting at byte offset off.
// It returns the number of bytes written and an error, if any.
func
(
f
*
File
)
pwrite
(
b
[]
byte
,
off
int64
)
(
n
int
,
err
syscall
.
E
rror
)
{
func
(
f
*
File
)
pwrite
(
b
[]
byte
,
off
int64
)
(
n
int
,
err
e
rror
)
{
return
syscall
.
Pwrite
(
f
.
fd
,
b
,
off
)
}
...
...
@@ -226,7 +226,7 @@ func (f *File) pwrite(b []byte, off int64) (n int, err syscall.Error) {
// according to whence: 0 means relative to the origin of the file, 1 means
// relative to the current offset, and 2 means relative to the end.
// It returns the new offset and an error, if any.
func
(
f
*
File
)
seek
(
offset
int64
,
whence
int
)
(
ret
int64
,
err
syscall
.
E
rror
)
{
func
(
f
*
File
)
seek
(
offset
int64
,
whence
int
)
(
ret
int64
,
err
e
rror
)
{
return
syscall
.
Seek
(
f
.
fd
,
offset
,
whence
)
}
...
...
src/pkg/os/stat_plan9.go
View file @
087a3486
...
...
@@ -34,7 +34,7 @@ func dirstat(arg interface{}) (d *Dir, err error) {
buf
:=
make
([]
byte
,
nd
)
var
n
int
var
e
syscall
.
E
rror
var
e
e
rror
switch
syscallArg
:=
arg
.
(
type
)
{
case
*
File
:
...
...
src/pkg/syscall/exec_plan9.go
View file @
087a3486
...
...
@@ -85,7 +85,7 @@ func gstring(b []byte) (string, []byte) {
}
// readdirnames returns the names of files inside the directory represented by dirfd.
func
readdirnames
(
dirfd
int
)
(
names
[]
string
,
err
E
rror
)
{
func
readdirnames
(
dirfd
int
)
(
names
[]
string
,
err
e
rror
)
{
result
:=
make
([]
string
,
0
,
100
)
var
buf
[
STATMAX
]
byte
...
...
@@ -117,7 +117,7 @@ func readdirnames(dirfd int) (names []string, err Error) {
// readdupdevice returns a list of currently opened fds (excluding stdin, stdout, stderr) from the dup device #d.
// ForkLock should be write locked before calling, so that no new fds would be created while the fd list is being read.
func
readdupdevice
()
(
fds
[]
int
,
err
E
rror
)
{
func
readdupdevice
()
(
fds
[]
int
,
err
e
rror
)
{
dupdevfd
,
err
:=
Open
(
"#d"
,
O_RDONLY
)
if
err
!=
nil
{
...
...
@@ -169,7 +169,7 @@ func init() {
// no rescheduling, no malloc calls, and no new stack segments.
// The calls to RawSyscall are okay because they are assembly
// functions that do not grow the stack.
func
forkAndExecInChild
(
argv0
*
byte
,
argv
[]
*
byte
,
envv
[]
envItem
,
dir
*
byte
,
attr
*
ProcAttr
,
fdsToClose
[]
int
,
pipe
int
,
rflag
int
)
(
pid
int
,
err
E
rror
)
{
func
forkAndExecInChild
(
argv0
*
byte
,
argv
[]
*
byte
,
envv
[]
envItem
,
dir
*
byte
,
attr
*
ProcAttr
,
fdsToClose
[]
int
,
pipe
int
,
rflag
int
)
(
pid
int
,
err
e
rror
)
{
// Declare all variables at top in case any
// declarations require heap allocation (e.g., errbuf).
var
(
...
...
@@ -314,7 +314,7 @@ childerror:
panic
(
"unreached"
)
}
func
cexecPipe
(
p
[]
int
)
E
rror
{
func
cexecPipe
(
p
[]
int
)
e
rror
{
e
:=
Pipe
(
p
)
if
e
!=
nil
{
return
e
...
...
@@ -351,7 +351,7 @@ type SysProcAttr struct {
var
zeroProcAttr
ProcAttr
var
zeroSysProcAttr
SysProcAttr
func
forkExec
(
argv0
string
,
argv
[]
string
,
attr
*
ProcAttr
)
(
pid
int
,
err
E
rror
)
{
func
forkExec
(
argv0
string
,
argv
[]
string
,
attr
*
ProcAttr
)
(
pid
int
,
err
e
rror
)
{
var
(
p
[
2
]
int
n
int
...
...
@@ -478,18 +478,18 @@ func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err Error)
}
// Combination of fork and exec, careful to be thread safe.
func
ForkExec
(
argv0
string
,
argv
[]
string
,
attr
*
ProcAttr
)
(
pid
int
,
err
E
rror
)
{
func
ForkExec
(
argv0
string
,
argv
[]
string
,
attr
*
ProcAttr
)
(
pid
int
,
err
e
rror
)
{
return
forkExec
(
argv0
,
argv
,
attr
)
}
// StartProcess wraps ForkExec for package os.
func
StartProcess
(
argv0
string
,
argv
[]
string
,
attr
*
ProcAttr
)
(
pid
,
handle
int
,
err
E
rror
)
{
func
StartProcess
(
argv0
string
,
argv
[]
string
,
attr
*
ProcAttr
)
(
pid
,
handle
int
,
err
e
rror
)
{
pid
,
err
=
forkExec
(
argv0
,
argv
,
attr
)
return
pid
,
0
,
err
}
// Ordinary exec.
func
Exec
(
argv0
string
,
argv
[]
string
,
envv
[]
string
)
(
err
E
rror
)
{
func
Exec
(
argv0
string
,
argv
[]
string
,
envv
[]
string
)
(
err
e
rror
)
{
if
envv
!=
nil
{
r1
,
_
,
_
:=
RawSyscall
(
SYS_RFORK
,
RFCENVG
,
0
,
0
)
if
int
(
r1
)
==
-
1
{
...
...
src/pkg/syscall/syscall_plan9.go
View file @
087a3486
...
...
@@ -23,7 +23,7 @@ type ErrorString string
func
(
e
ErrorString
)
Error
()
string
{
return
string
(
e
)
}
// NewError converts s to an ErrorString, which satisfies the Error interface.
func
NewError
(
s
string
)
E
rror
{
return
ErrorString
(
s
)
}
func
NewError
(
s
string
)
e
rror
{
return
ErrorString
(
s
)
}
var
(
Stdin
=
0
...
...
@@ -89,7 +89,7 @@ func Exit(code int) {
Exits
(
&
msg
)
}
func
readnum
(
path
string
)
(
uint
,
E
rror
)
{
func
readnum
(
path
string
)
(
uint
,
e
rror
)
{
var
b
[
12
]
byte
fd
,
e
:=
Open
(
path
,
O_RDONLY
)
...
...
@@ -121,15 +121,15 @@ func Getppid() (ppid int) {
return
int
(
n
)
}
func
Read
(
fd
int
,
p
[]
byte
)
(
n
int
,
err
E
rror
)
{
func
Read
(
fd
int
,
p
[]
byte
)
(
n
int
,
err
e
rror
)
{
return
Pread
(
fd
,
p
,
-
1
)
}
func
Write
(
fd
int
,
p
[]
byte
)
(
n
int
,
err
E
rror
)
{
func
Write
(
fd
int
,
p
[]
byte
)
(
n
int
,
err
e
rror
)
{
return
Pwrite
(
fd
,
p
,
-
1
)
}
func
Getwd
()
(
wd
string
,
err
E
rror
)
{
func
Getwd
()
(
wd
string
,
err
e
rror
)
{
fd
,
e
:=
Open
(
"."
,
O_RDONLY
)
if
e
!=
nil
{
...
...
@@ -140,8 +140,8 @@ func Getwd() (wd string, err Error) {
return
Fd2path
(
fd
)
}
//sys fd2path(fd int, buf []byte) (err
E
rror)
func
Fd2path
(
fd
int
)
(
path
string
,
err
E
rror
)
{
//sys fd2path(fd int, buf []byte) (err
e
rror)
func
Fd2path
(
fd
int
)
(
path
string
,
err
e
rror
)
{
var
buf
[
512
]
byte
e
:=
fd2path
(
fd
,
buf
[
:
])
...
...
@@ -151,8 +151,8 @@ func Fd2path(fd int) (path string, err Error) {
return
cstring
(
buf
[
:
]),
nil
}
//sys pipe(p *[2]_C_int) (err
E
rror)
func
Pipe
(
p
[]
int
)
(
err
E
rror
)
{
//sys pipe(p *[2]_C_int) (err
e
rror)
func
Pipe
(
p
[]
int
)
(
err
e
rror
)
{
if
len
(
p
)
!=
2
{
return
NewError
(
"bad arg in system call"
)
}
...
...
@@ -167,7 +167,7 @@ func Pipe(p []int) (err Error) {
// Implemented in assembly to avoid allocation.
func
seek
(
placeholder
uintptr
,
fd
int
,
offset
int64
,
whence
int
)
(
newoffset
int64
,
err
string
)
func
Seek
(
fd
int
,
offset
int64
,
whence
int
)
(
newoffset
int64
,
err
E
rror
)
{
func
Seek
(
fd
int
,
offset
int64
,
whence
int
)
(
newoffset
int64
,
err
e
rror
)
{
newoffset
,
e
:=
seek
(
0
,
fd
,
offset
,
whence
)
err
=
nil
...
...
@@ -177,7 +177,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err Error) {
return
}
func
Mkdir
(
path
string
,
mode
uint32
)
(
err
E
rror
)
{
func
Mkdir
(
path
string
,
mode
uint32
)
(
err
e
rror
)
{
fd
,
err
:=
Create
(
path
,
O_RDONLY
,
DMDIR
|
mode
)
if
fd
!=
-
1
{
...
...
@@ -204,8 +204,8 @@ func (w Waitmsg) ExitStatus() int {
return
1
}
//sys await(s []byte) (n int, err
E
rror)
func
Await
(
w
*
Waitmsg
)
(
err
E
rror
)
{
//sys await(s []byte) (n int, err
e
rror)
func
Await
(
w
*
Waitmsg
)
(
err
e
rror
)
{
var
buf
[
512
]
byte
var
f
[
5
][]
byte
...
...
@@ -242,7 +242,7 @@ func Await(w *Waitmsg) (err Error) {
return
}
func
Unmount
(
name
,
old
string
)
(
err
E
rror
)
{
func
Unmount
(
name
,
old
string
)
(
err
e
rror
)
{
oldp
:=
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
old
)))
var
r0
uintptr
...
...
@@ -262,7 +262,7 @@ func Unmount(name, old string) (err Error) {
return
}
func
Fchdir
(
fd
int
)
(
err
E
rror
)
{
func
Fchdir
(
fd
int
)
(
err
e
rror
)
{
path
,
err
:=
Fd2path
(
fd
)
if
err
!=
nil
{
...
...
@@ -284,7 +284,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
return
}
func
DecodeBintime
(
b
[]
byte
)
(
nsec
int64
,
err
E
rror
)
{
func
DecodeBintime
(
b
[]
byte
)
(
nsec
int64
,
err
e
rror
)
{
if
len
(
b
)
!=
8
{
return
-
1
,
NewError
(
"bad /dev/bintime format"
)
}
...
...
@@ -300,7 +300,7 @@ func DecodeBintime(b []byte) (nsec int64, err Error) {
return
}
func
Gettimeofday
(
tv
*
Timeval
)
(
err
E
rror
)
{
func
Gettimeofday
(
tv
*
Timeval
)
(
err
e
rror
)
{
// TODO(paulzhol):
// avoid reopening a file descriptor for /dev/bintime on each call,
// use lower-level calls to avoid allocation.
...
...
@@ -331,7 +331,7 @@ func Geteuid() (euid int) { return -1 }
func
Getgid
()
(
gid
int
)
{
return
-
1
}
func
Getuid
()
(
uid
int
)
{
return
-
1
}
func
Getgroups
()
(
gids
[]
int
,
err
E
rror
)
{
func
Getgroups
()
(
gids
[]
int
,
err
e
rror
)
{
return
make
([]
int
,
0
),
nil
}
...
...
src/pkg/syscall/zsyscall_plan9_386.go
View file @
087a3486
...
...
@@ -14,7 +14,7 @@ func exits(msg *byte) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
fd2path
(
fd
int
,
buf
[]
byte
)
(
err
E
rror
)
{
func
fd2path
(
fd
int
,
buf
[]
byte
)
(
err
e
rror
)
{
var
_p0
unsafe
.
Pointer
if
len
(
buf
)
>
0
{
_p0
=
unsafe
.
Pointer
(
&
buf
[
0
])
...
...
@@ -31,7 +31,7 @@ func fd2path(fd int, buf []byte) (err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
pipe
(
p
*
[
2
]
_C_int
)
(
err
E
rror
)
{
func
pipe
(
p
*
[
2
]
_C_int
)
(
err
e
rror
)
{
r0
,
_
,
e1
:=
Syscall
(
SYS_PIPE
,
uintptr
(
unsafe
.
Pointer
(
p
)),
0
,
0
)
err
=
nil
if
int
(
r0
)
==
-
1
{
...
...
@@ -42,7 +42,7 @@ func pipe(p *[2]_C_int) (err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
sleep
(
millisecs
int32
)
(
err
E
rror
)
{
func
sleep
(
millisecs
int32
)
(
err
e
rror
)
{
r0
,
_
,
e1
:=
Syscall
(
SYS_SLEEP
,
uintptr
(
millisecs
),
0
,
0
)
err
=
nil
if
int
(
r0
)
==
-
1
{
...
...
@@ -53,7 +53,7 @@ func sleep(millisecs int32) (err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
await
(
s
[]
byte
)
(
n
int
,
err
E
rror
)
{
func
await
(
s
[]
byte
)
(
n
int
,
err
e
rror
)
{
var
_p0
unsafe
.
Pointer
if
len
(
s
)
>
0
{
_p0
=
unsafe
.
Pointer
(
&
s
[
0
])
...
...
@@ -71,7 +71,7 @@ func await(s []byte) (n int, err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Dup
(
oldfd
int
,
newfd
int
)
(
fd
int
,
err
E
rror
)
{
func
Dup
(
oldfd
int
,
newfd
int
)
(
fd
int
,
err
e
rror
)
{
r0
,
_
,
e1
:=
Syscall
(
SYS_DUP
,
uintptr
(
oldfd
),
uintptr
(
newfd
),
0
)
fd
=
int
(
r0
)
err
=
nil
...
...
@@ -83,7 +83,7 @@ func Dup(oldfd int, newfd int) (fd int, err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Open
(
path
string
,
mode
int
)
(
fd
int
,
err
E
rror
)
{
func
Open
(
path
string
,
mode
int
)
(
fd
int
,
err
e
rror
)
{
r0
,
_
,
e1
:=
Syscall
(
SYS_OPEN
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
path
))),
uintptr
(
mode
),
0
)
fd
=
int
(
r0
)
err
=
nil
...
...
@@ -95,7 +95,7 @@ func Open(path string, mode int) (fd int, err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Create
(
path
string
,
mode
int
,
perm
uint32
)
(
fd
int
,
err
E
rror
)
{
func
Create
(
path
string
,
mode
int
,
perm
uint32
)
(
fd
int
,
err
e
rror
)
{
r0
,
_
,
e1
:=
Syscall
(
SYS_CREATE
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
path
))),
uintptr
(
mode
),
uintptr
(
perm
))
fd
=
int
(
r0
)
err
=
nil
...
...
@@ -107,7 +107,7 @@ func Create(path string, mode int, perm uint32) (fd int, err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Remove
(
path
string
)
(
err
E
rror
)
{
func
Remove
(
path
string
)
(
err
e
rror
)
{
r0
,
_
,
e1
:=
Syscall
(
SYS_REMOVE
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
path
))),
0
,
0
)
err
=
nil
if
int
(
r0
)
==
-
1
{
...
...
@@ -118,7 +118,7 @@ func Remove(path string) (err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Pread
(
fd
int
,
p
[]
byte
,
offset
int64
)
(
n
int
,
err
E
rror
)
{
func
Pread
(
fd
int
,
p
[]
byte
,
offset
int64
)
(
n
int
,
err
e
rror
)
{
var
_p0
unsafe
.
Pointer
if
len
(
p
)
>
0
{
_p0
=
unsafe
.
Pointer
(
&
p
[
0
])
...
...
@@ -136,7 +136,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Pwrite
(
fd
int
,
p
[]
byte
,
offset
int64
)
(
n
int
,
err
E
rror
)
{
func
Pwrite
(
fd
int
,
p
[]
byte
,
offset
int64
)
(
n
int
,
err
e
rror
)
{
var
_p0
unsafe
.
Pointer
if
len
(
p
)
>
0
{
_p0
=
unsafe
.
Pointer
(
&
p
[
0
])
...
...
@@ -154,7 +154,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Close
(
fd
int
)
(
err
E
rror
)
{
func
Close
(
fd
int
)
(
err
e
rror
)
{
r0
,
_
,
e1
:=
Syscall
(
SYS_CLOSE
,
uintptr
(
fd
),
0
,
0
)
err
=
nil
if
int
(
r0
)
==
-
1
{
...
...
@@ -165,7 +165,7 @@ func Close(fd int) (err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Chdir
(
path
string
)
(
err
E
rror
)
{
func
Chdir
(
path
string
)
(
err
e
rror
)
{
r0
,
_
,
e1
:=
Syscall
(
SYS_CHDIR
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
path
))),
0
,
0
)
err
=
nil
if
int
(
r0
)
==
-
1
{
...
...
@@ -176,7 +176,7 @@ func Chdir(path string) (err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Bind
(
name
string
,
old
string
,
flag
int
)
(
err
E
rror
)
{
func
Bind
(
name
string
,
old
string
,
flag
int
)
(
err
e
rror
)
{
r0
,
_
,
e1
:=
Syscall
(
SYS_BIND
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
name
))),
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
old
))),
uintptr
(
flag
))
err
=
nil
if
int
(
r0
)
==
-
1
{
...
...
@@ -187,7 +187,7 @@ func Bind(name string, old string, flag int) (err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Mount
(
fd
int
,
afd
int
,
old
string
,
flag
int
,
aname
string
)
(
err
E
rror
)
{
func
Mount
(
fd
int
,
afd
int
,
old
string
,
flag
int
,
aname
string
)
(
err
e
rror
)
{
r0
,
_
,
e1
:=
Syscall6
(
SYS_MOUNT
,
uintptr
(
fd
),
uintptr
(
afd
),
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
old
))),
uintptr
(
flag
),
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
aname
))),
0
)
err
=
nil
if
int
(
r0
)
==
-
1
{
...
...
@@ -198,7 +198,7 @@ func Mount(fd int, afd int, old string, flag int, aname string) (err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Stat
(
path
string
,
edir
[]
byte
)
(
n
int
,
err
E
rror
)
{
func
Stat
(
path
string
,
edir
[]
byte
)
(
n
int
,
err
e
rror
)
{
var
_p0
unsafe
.
Pointer
if
len
(
edir
)
>
0
{
_p0
=
unsafe
.
Pointer
(
&
edir
[
0
])
...
...
@@ -216,7 +216,7 @@ func Stat(path string, edir []byte) (n int, err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Fstat
(
fd
int
,
edir
[]
byte
)
(
n
int
,
err
E
rror
)
{
func
Fstat
(
fd
int
,
edir
[]
byte
)
(
n
int
,
err
e
rror
)
{
var
_p0
unsafe
.
Pointer
if
len
(
edir
)
>
0
{
_p0
=
unsafe
.
Pointer
(
&
edir
[
0
])
...
...
@@ -234,7 +234,7 @@ func Fstat(fd int, edir []byte) (n int, err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Wstat
(
path
string
,
edir
[]
byte
)
(
err
E
rror
)
{
func
Wstat
(
path
string
,
edir
[]
byte
)
(
err
e
rror
)
{
var
_p0
unsafe
.
Pointer
if
len
(
edir
)
>
0
{
_p0
=
unsafe
.
Pointer
(
&
edir
[
0
])
...
...
@@ -251,7 +251,7 @@ func Wstat(path string, edir []byte) (err Error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Fwstat
(
fd
int
,
edir
[]
byte
)
(
err
E
rror
)
{
func
Fwstat
(
fd
int
,
edir
[]
byte
)
(
err
e
rror
)
{
var
_p0
unsafe
.
Pointer
if
len
(
edir
)
>
0
{
_p0
=
unsafe
.
Pointer
(
&
edir
[
0
])
...
...
src/pkg/time/sys_plan9.go
View file @
087a3486
...
...
@@ -4,11 +4,6 @@
package
time
import
(
"os"
"syscall"
)
// for testing: whatever interrupts a sleep
func
interrupt
()
{
// cannot predict pid, don't want to kill group
...
...
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