Commit fd25fe60 authored by Mikio Hara's avatar Mikio Hara

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/43692Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 15aa04d2
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment