]> Cypherpunks repositories - gostls13.git/commitdiff
internal/poll: remove unused ioSrv.ExecIO parameter
authorAlex Brainman <alex.brainman@gmail.com>
Fri, 19 May 2017 05:08:29 +0000 (15:08 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Fri, 19 May 2017 07:14:25 +0000 (07:14 +0000)
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>

src/internal/poll/fd_windows.go
src/internal/poll/sendfile_windows.go

index e212f38ff103717bc3ca05464c3e474f8c0a0266..a41209c34423fcda2bb6a14e933c547f56ab5c96 100644 (file)
@@ -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 {
index 762165a2bf8bcdc1219668ee1c895dfaa64c0b11..c1a2d6d17659b41d51913d6e5e4c874e95ffd9ac 100644 (file)
@@ -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