summaryrefslogtreecommitdiffhomepage
path: root/conn
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-04-06 11:45:10 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2021-04-09 14:26:08 -0600
commitfbf97502cfcfcf35e7963e02b4412e46396334a1 (patch)
treeda32736e4a928dbbec68bc02973aa6c42a399c8d /conn
parent10533c3e73cdb6f4c4f19e01464782b69ace739e (diff)
winrio: test that IOCP-based RIO is supported
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'conn')
-rw-r--r--conn/winrio/rio_windows.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/conn/winrio/rio_windows.go b/conn/winrio/rio_windows.go
index 2f13ec8..0a07c65 100644
--- a/conn/winrio/rio_windows.go
+++ b/conn/winrio/rio_windows.go
@@ -118,9 +118,17 @@ func Initialize() bool {
if err != nil {
return
}
+
// 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.
- 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 {
return
}