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
10cdec92
Commit
10cdec92
authored
Jan 05, 2010
by
Devon H. O'Dell
Committed by
Russ Cox
Jan 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syscall: add nanosleep on FreeBSD
Fixes #461 R=rsc CC=golang-dev
https://golang.org/cl/181059
parent
0281b715
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
syscall_freebsd.go
src/pkg/syscall/syscall_freebsd.go
+1
-0
zsyscall_freebsd_386.go
src/pkg/syscall/zsyscall_freebsd_386.go
+6
-0
zsyscall_freebsd_amd64.go
src/pkg/syscall/zsyscall_freebsd_amd64.go
+6
-0
No files found.
src/pkg/syscall/syscall_freebsd.go
View file @
10cdec92
...
...
@@ -520,6 +520,7 @@ func SysctlUint32(name string) (value uint32, errno int) {
//sys Mkdir(path string, mode int) (errno int)
//sys Mkfifo(path string, mode int) (errno int)
//sys Mknod(path string, mode int, dev int) (errno int)
//sys Nanosleep(time *Timespec, leftover *Timespec) (errno int)
//sys Open(path string, mode int, perm int) (fd int, errno int)
//sys Pathconf(path string, name int) (val int, errno int)
//sys Pread(fd int, p []byte, offset int64) (n int, errno int)
...
...
src/pkg/syscall/zsyscall_freebsd_386.go
View file @
10cdec92
...
...
@@ -425,6 +425,12 @@ func Mknod(path string, mode int, dev int) (errno int) {
return
}
func
Nanosleep
(
time
*
Timespec
,
leftover
*
Timespec
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall
(
SYS_NANOSLEEP
,
uintptr
(
unsafe
.
Pointer
(
time
)),
uintptr
(
unsafe
.
Pointer
(
leftover
)),
0
)
errno
=
int
(
e1
)
return
}
func
Open
(
path
string
,
mode
int
,
perm
int
)
(
fd
int
,
errno
int
)
{
r0
,
_
,
e1
:=
Syscall
(
SYS_OPEN
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
path
))),
uintptr
(
mode
),
uintptr
(
perm
))
fd
=
int
(
r0
)
...
...
src/pkg/syscall/zsyscall_freebsd_amd64.go
View file @
10cdec92
...
...
@@ -425,6 +425,12 @@ func Mknod(path string, mode int, dev int) (errno int) {
return
}
func
Nanosleep
(
time
*
Timespec
,
leftover
*
Timespec
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall
(
SYS_NANOSLEEP
,
uintptr
(
unsafe
.
Pointer
(
time
)),
uintptr
(
unsafe
.
Pointer
(
leftover
)),
0
)
errno
=
int
(
e1
)
return
}
func
Open
(
path
string
,
mode
int
,
perm
int
)
(
fd
int
,
errno
int
)
{
r0
,
_
,
e1
:=
Syscall
(
SYS_OPEN
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
path
))),
uintptr
(
mode
),
uintptr
(
perm
))
fd
=
int
(
r0
)
...
...
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