aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2013-02-14 17:41:49 +0100
committerRickard Green <[email protected]>2013-02-14 17:41:49 +0100
commit85775c504842e669d0bca9c62909366990954ed2 (patch)
treefee11e9377d53b3a84687d5955fedff7cba0c109 /erts
parent74b096954c582cdf517925648415e6a1e321e885 (diff)
parentd73d6da23e77d5b7a803209319ad2709f03505a9 (diff)
downloadotp-85775c504842e669d0bca9c62909366990954ed2.tar.gz
otp-85775c504842e669d0bca9c62909366990954ed2.tar.bz2
otp-85775c504842e669d0bca9c62909366990954ed2.zip
Merge branch 'rickard/win-drv-bugfix/OTP-10807'
* rickard/win-drv-bugfix/OTP-10807: Fix flush of fd-driver on Windows
Diffstat (limited to 'erts')
-rwxr-xr-xerts/emulator/sys/win32/sys.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c
index 0d1322691e..19dffd0ea4 100755
--- a/erts/emulator/sys/win32/sys.c
+++ b/erts/emulator/sys/win32/sys.c
@@ -916,6 +916,8 @@ init_async_io(DriverData *dp, AsyncIo* aio, int use_threads)
if (aio->ov.hEvent == NULL)
return -1;
if (use_threads) {
+ OV_BUFFER_PTR(aio) = NULL;
+ OV_NUM_TO_READ(aio) = 0;
aio->ioAllowed = CreateAutoEvent(FALSE);
if (aio->ioAllowed == NULL)
return -1;
@@ -2330,6 +2332,7 @@ static void fd_stop(ErlDrvData data)
(void) driver_select(dp->port_num,
(ErlDrvEvent)dp->out.ov.hEvent,
ERL_DRV_WRITE, 0);
+ ASSERT(dp->out.flushEvent);
SetEvent(dp->out.flushEvent);
WaitForSingleObject(dp->out.flushReplyEvent, INFINITE);
}