mirror of
https://github.com/golang/go
synced 2024-11-18 12:04:57 -07:00
internal/poll: remove unused ioSrv.ExecIO parameter
Change-Id: If5cb80c3c086684ce6c2e8ed9bb23b2a20c8aacd Reviewed-on: https://go-review.googlesource.com/43690 Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
6144c7270e
commit
e309dd938f
@ -153,7 +153,7 @@ func (s *ioSrv) ProcessRemoteIO() {
|
||||
// IO in the current thread for systems where Windows CancelIoEx API
|
||||
// is available. Alternatively, it passes the request onto
|
||||
// runtime netpoll and waits for completion or cancels request.
|
||||
func (s *ioSrv) ExecIO(o *operation, name string, submit func(o *operation) error) (int, error) {
|
||||
func (s *ioSrv) ExecIO(o *operation, submit func(o *operation) error) (int, error) {
|
||||
if !canCancelIO {
|
||||
onceStartServer.Do(startServer)
|
||||
}
|
||||
@ -419,7 +419,7 @@ func (fd *FD) Read(buf []byte) (int, error) {
|
||||
} else {
|
||||
o := &fd.rop
|
||||
o.InitBuf(buf)
|
||||
n, err = rsrv.ExecIO(o, "WSARecv", func(o *operation) error {
|
||||
n, err = rsrv.ExecIO(o, func(o *operation) error {
|
||||
return syscall.WSARecv(o.fd.Sysfd, &o.buf, 1, &o.qty, &o.flags, &o.o, nil)
|
||||
})
|
||||
if race.Enabled {
|
||||
@ -552,7 +552,7 @@ func (fd *FD) ReadFrom(buf []byte) (int, syscall.Sockaddr, error) {
|
||||
defer fd.readUnlock()
|
||||
o := &fd.rop
|
||||
o.InitBuf(buf)
|
||||
n, err := rsrv.ExecIO(o, "WSARecvFrom", func(o *operation) error {
|
||||
n, err := rsrv.ExecIO(o, func(o *operation) error {
|
||||
if o.rsa == nil {
|
||||
o.rsa = new(syscall.RawSockaddrAny)
|
||||
}
|
||||
@ -593,7 +593,7 @@ func (fd *FD) Write(buf []byte) (int, error) {
|
||||
}
|
||||
o := &fd.wop
|
||||
o.InitBuf(buf)
|
||||
n, err = wsrv.ExecIO(o, "WSASend", func(o *operation) error {
|
||||
n, err = wsrv.ExecIO(o, func(o *operation) error {
|
||||
return syscall.WSASend(o.fd.Sysfd, &o.buf, 1, &o.qty, 0, &o.o, nil)
|
||||
})
|
||||
}
|
||||
@ -685,7 +685,7 @@ func (fd *FD) Writev(buf *[][]byte) (int64, error) {
|
||||
}
|
||||
o := &fd.wop
|
||||
o.InitBufs(buf)
|
||||
n, err := wsrv.ExecIO(o, "WSASend", func(o *operation) error {
|
||||
n, err := wsrv.ExecIO(o, func(o *operation) error {
|
||||
return syscall.WSASend(o.fd.Sysfd, &o.bufs[0], uint32(len(o.bufs)), &o.qty, 0, &o.o, nil)
|
||||
})
|
||||
o.ClearBufs()
|
||||
@ -706,7 +706,7 @@ func (fd *FD) WriteTo(buf []byte, sa syscall.Sockaddr) (int, error) {
|
||||
o := &fd.wop
|
||||
o.InitBuf(buf)
|
||||
o.sa = sa
|
||||
n, err := wsrv.ExecIO(o, "WSASendto", func(o *operation) error {
|
||||
n, err := wsrv.ExecIO(o, func(o *operation) error {
|
||||
return syscall.WSASendto(o.fd.Sysfd, &o.buf, 1, &o.qty, 0, o.sa, &o.o, nil)
|
||||
})
|
||||
return n, err
|
||||
@ -718,7 +718,7 @@ func (fd *FD) WriteTo(buf []byte, sa syscall.Sockaddr) (int, error) {
|
||||
func (fd *FD) ConnectEx(ra syscall.Sockaddr) error {
|
||||
o := &fd.wop
|
||||
o.sa = ra
|
||||
_, err := wsrv.ExecIO(o, "ConnectEx", func(o *operation) error {
|
||||
_, err := wsrv.ExecIO(o, func(o *operation) error {
|
||||
return ConnectExFunc(o.fd.Sysfd, o.sa, nil, 0, nil, &o.o)
|
||||
})
|
||||
return err
|
||||
@ -728,7 +728,7 @@ func (fd *FD) acceptOne(s syscall.Handle, rawsa []syscall.RawSockaddrAny, o *ope
|
||||
// Submit accept request.
|
||||
o.handle = s
|
||||
o.rsan = int32(unsafe.Sizeof(rawsa[0]))
|
||||
_, err := rsrv.ExecIO(o, "AcceptEx", func(o *operation) error {
|
||||
_, err := rsrv.ExecIO(o, func(o *operation) error {
|
||||
return AcceptFunc(o.fd.Sysfd, o.handle, (*byte)(unsafe.Pointer(&rawsa[0])), 0, uint32(o.rsan), uint32(o.rsan), &o.qty, &o.o)
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -16,7 +16,7 @@ func SendFile(fd *FD, src syscall.Handle, n int64) (int64, error) {
|
||||
o := &fd.wop
|
||||
o.qty = uint32(n)
|
||||
o.handle = src
|
||||
done, err := wsrv.ExecIO(o, "TransmitFile", func(o *operation) error {
|
||||
done, err := wsrv.ExecIO(o, func(o *operation) error {
|
||||
return syscall.TransmitFile(o.fd.Sysfd, o.handle, o.qty, 0, &o.o, nil, syscall.TF_WRITE_BEHIND)
|
||||
})
|
||||
return int64(done), err
|
||||
|
Loading…
Reference in New Issue
Block a user