1
0
mirror of https://github.com/golang/go synced 2024-11-18 03:54:50 -07:00

internal/poll: implement RawControl of FD on Windows

This is a followup to https://go-review.googlesource.com/37038.

Updates #19435.

Change-Id: If3d56bca0e8816d1a169f5cf97f27b20695a9955
Reviewed-on: https://go-review.googlesource.com/43692
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Mikio Hara 2017-05-19 18:49:28 +09:00
parent 15aa04d200
commit fd25fe60fa

View File

@ -837,7 +837,12 @@ func (fd *FD) GetFileInformationByHandle(data *syscall.ByHandleFileInformation)
// RawControl invokes the user-defined function f for a non-IO
// operation.
func (fd *FD) RawControl(f func(uintptr)) error {
return errors.New("not implemented")
if err := fd.incref(); err != nil {
return err
}
defer fd.decref()
f(uintptr(fd.Sysfd))
return nil
}
// RawRead invokes the user-defined function f for a read operation.