aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2013-02-04 14:18:53 +0100
committerRickard Green <[email protected]>2013-02-05 11:01:01 +0100
commitd73d6da23e77d5b7a803209319ad2709f03505a9 (patch)
treeffe3383c7ed5f0bc0fb710f1e88fd2245bb98ff7 /erts
parent7d21afe83b40d1f9406fc2f54de52bc8aa392138 (diff)
downloadotp-d73d6da23e77d5b7a803209319ad2709f03505a9.tar.gz
otp-d73d6da23e77d5b7a803209319ad2709f03505a9.tar.bz2
otp-d73d6da23e77d5b7a803209319ad2709f03505a9.zip
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 307ca4866f..133cfd3549 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);
}