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
bf73ca88
Commit
bf73ca88
authored
May 20, 2011
by
Brad Fitzpatrick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syscall: sendfile
R=iant CC=golang-dev
https://golang.org/cl/4553051
parent
5107041d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
50 additions
and
1 deletion
+50
-1
syscall_darwin.go
src/pkg/syscall/syscall_darwin.go
+5
-0
syscall_freebsd.go
src/pkg/syscall/syscall_freebsd.go
+5
-0
syscall_linux.go
src/pkg/syscall/syscall_linux.go
+0
-1
syscall_linux_386.go
src/pkg/syscall/syscall_linux_386.go
+1
-0
syscall_linux_amd64.go
src/pkg/syscall/syscall_linux_amd64.go
+1
-0
syscall_linux_arm.go
src/pkg/syscall/syscall_linux_arm.go
+1
-0
syscall_plan9.go
src/pkg/syscall/syscall_plan9.go
+5
-0
syscall_windows.go
src/pkg/syscall/syscall_windows.go
+5
-0
zsyscall_linux_386.go
src/pkg/syscall/zsyscall_linux_386.go
+9
-0
zsyscall_linux_amd64.go
src/pkg/syscall/zsyscall_linux_amd64.go
+9
-0
zsyscall_linux_arm.go
src/pkg/syscall/zsyscall_linux_arm.go
+9
-0
No files found.
src/pkg/syscall/syscall_darwin.go
View file @
bf73ca88
...
...
@@ -56,6 +56,11 @@ func ParseDirent(buf []byte, max int, names []string) (consumed int, count int,
return
origlen
-
len
(
buf
),
count
,
names
}
// TODO
func
Sendfile
(
outfd
int
,
infd
int
,
offset
*
int64
,
count
int
)
(
written
int
,
errno
int
)
{
return
-
1
,
ENOSYS
}
/*
* Wrapped
*/
...
...
src/pkg/syscall/syscall_freebsd.go
View file @
bf73ca88
...
...
@@ -56,6 +56,11 @@ func ParseDirent(buf []byte, max int, names []string) (consumed int, count int,
return
origlen
-
len
(
buf
),
count
,
names
}
// TODO
func
Sendfile
(
outfd
int
,
infd
int
,
offset
*
int64
,
count
int
)
(
written
int
,
errno
int
)
{
return
-
1
,
ENOSYS
}
/*
* Exposed directly
*/
...
...
src/pkg/syscall/syscall_linux.go
View file @
bf73ca88
...
...
@@ -957,7 +957,6 @@ func Munmap(b []byte) (errno int) {
// Semget
// Semop
// Semtimedop
// Sendfile
// SetMempolicy
// SetRobustList
// SetThreadArea
...
...
src/pkg/syscall/syscall_linux_386.go
View file @
bf73ca88
...
...
@@ -41,6 +41,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
//sys Lstat(path string, stat *Stat_t) (errno int) = SYS_LSTAT64
//sys Pread(fd int, p []byte, offset int64) (n int, errno int) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, errno int) = SYS_PWRITE64
//sys Sendfile(outfd int, infd int, offset *int64, count int) (written int, errno int) = SYS_SENDFILE64
//sys Setfsgid(gid int) (errno int) = SYS_SETFSGID32
//sys Setfsuid(uid int) (errno int) = SYS_SETFSUID32
//sysnb Setgid(gid int) (errno int) = SYS_SETGID32
...
...
src/pkg/syscall/syscall_linux_amd64.go
View file @
bf73ca88
...
...
@@ -22,6 +22,7 @@ package syscall
//sys Pwrite(fd int, p []byte, offset int64) (n int, errno int) = SYS_PWRITE64
//sys Seek(fd int, offset int64, whence int) (off int64, errno int) = SYS_LSEEK
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, errno int)
//sys Sendfile(outfd int, infd int, offset *int64, count int) (written int, errno int)
//sys Setfsgid(gid int) (errno int)
//sys Setfsuid(uid int) (errno int)
//sysnb Setgid(gid int) (errno int)
...
...
src/pkg/syscall/syscall_linux_arm.go
View file @
bf73ca88
...
...
@@ -92,6 +92,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, errno int)
//sys Lchown(path string, uid int, gid int) (errno int)
//sys Listen(s int, n int) (errno int)
//sys Lstat(path string, stat *Stat_t) (errno int) = SYS_LSTAT64
//sys Sendfile(outfd int, infd int, offset *int64, count int) (written int, errno int) = SYS_SENDFILE64
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, errno int) = SYS__NEWSELECT
//sys Setfsgid(gid int) (errno int)
//sys Setfsuid(uid int) (errno int)
...
...
src/pkg/syscall/syscall_plan9.go
View file @
bf73ca88
...
...
@@ -327,6 +327,11 @@ func Getgroups() (gids []int, err Error) {
return
make
([]
int
,
0
),
nil
}
// TODO
func
Sendfile
(
outfd
int
,
infd
int
,
offset
*
int64
,
count
int
)
(
written
int
,
errno
int
)
{
return
-
1
,
ENOSYS
}
//sys Dup(oldfd int, newfd int) (fd int, err Error)
//sys Open(path string, mode int) (fd int, err Error)
//sys Create(path string, mode int, perm uint32) (fd int, err Error)
...
...
src/pkg/syscall/syscall_windows.go
View file @
bf73ca88
...
...
@@ -102,6 +102,11 @@ func getSysProcAddr(m uint32, pname string) uintptr {
// Implemented in ../runtime/windows/syscall.cgo
func
NewCallback
(
fn
interface
{})
uintptr
// TODO
func
Sendfile
(
outfd
int
,
infd
int
,
offset
*
int64
,
count
int
)
(
written
int
,
errno
int
)
{
return
-
1
,
ENOSYS
}
// windows api calls
//sys GetLastError() (lasterrno int)
...
...
src/pkg/syscall/zsyscall_linux_386.go
View file @
bf73ca88
...
...
@@ -971,6 +971,15 @@ func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Sendfile
(
outfd
int
,
infd
int
,
offset
*
int64
,
count
int
)
(
written
int
,
errno
int
)
{
r0
,
_
,
e1
:=
Syscall6
(
SYS_SENDFILE64
,
uintptr
(
outfd
),
uintptr
(
infd
),
uintptr
(
unsafe
.
Pointer
(
offset
)),
uintptr
(
count
),
0
,
0
)
written
=
int
(
r0
)
errno
=
int
(
e1
)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Setfsgid
(
gid
int
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall
(
SYS_SETFSGID32
,
uintptr
(
gid
),
0
,
0
)
errno
=
int
(
e1
)
...
...
src/pkg/syscall/zsyscall_linux_amd64.go
View file @
bf73ca88
...
...
@@ -1005,6 +1005,15 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Sendfile
(
outfd
int
,
infd
int
,
offset
*
int64
,
count
int
)
(
written
int
,
errno
int
)
{
r0
,
_
,
e1
:=
Syscall6
(
SYS_SENDFILE
,
uintptr
(
outfd
),
uintptr
(
infd
),
uintptr
(
unsafe
.
Pointer
(
offset
)),
uintptr
(
count
),
0
,
0
)
written
=
int
(
r0
)
errno
=
int
(
e1
)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Setfsgid
(
gid
int
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall
(
SYS_SETFSGID
,
uintptr
(
gid
),
0
,
0
)
errno
=
int
(
e1
)
...
...
src/pkg/syscall/zsyscall_linux_arm.go
View file @
bf73ca88
...
...
@@ -1070,6 +1070,15 @@ func Lstat(path string, stat *Stat_t) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Sendfile
(
outfd
int
,
infd
int
,
offset
*
int64
,
count
int
)
(
written
int
,
errno
int
)
{
r0
,
_
,
e1
:=
Syscall6
(
SYS_SENDFILE64
,
uintptr
(
outfd
),
uintptr
(
infd
),
uintptr
(
unsafe
.
Pointer
(
offset
)),
uintptr
(
count
),
0
,
0
)
written
=
int
(
r0
)
errno
=
int
(
e1
)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Select
(
nfd
int
,
r
*
FdSet
,
w
*
FdSet
,
e
*
FdSet
,
timeout
*
Timeval
)
(
n
int
,
errno
int
)
{
r0
,
_
,
e1
:=
Syscall6
(
SYS__NEWSELECT
,
uintptr
(
nfd
),
uintptr
(
unsafe
.
Pointer
(
r
)),
uintptr
(
unsafe
.
Pointer
(
w
)),
uintptr
(
unsafe
.
Pointer
(
e
)),
uintptr
(
unsafe
.
Pointer
(
timeout
)),
0
)
n
=
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