winrio: test that IOCP-based RIO is supported
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
10533c3e73
commit
fbf97502cf
|
@ -118,9 +118,17 @@ func Initialize() bool {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// While we should be able to stop here, after getting the function pointers, some anti-virus actually causes
|
// While we should be able to stop here, after getting the function pointers, some anti-virus actually causes
|
||||||
// failures in RIOCreateRequestQueue, so keep going to be certain this is supported.
|
// failures in RIOCreateRequestQueue, so keep going to be certain this is supported.
|
||||||
cq, err = CreatePolledCompletionQueue(2)
|
var iocp windows.Handle
|
||||||
|
iocp, err = windows.CreateIoCompletionPort(windows.InvalidHandle, 0, 0, 0)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer windows.CloseHandle(iocp)
|
||||||
|
var overlapped windows.Overlapped
|
||||||
|
cq, err = CreateIOCPCompletionQueue(2, iocp, 0, &overlapped)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue