diff options
author | Rickard Green <[email protected]> | 2013-02-04 14:18:53 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2013-02-05 11:01:01 +0100 |
commit | d73d6da23e77d5b7a803209319ad2709f03505a9 (patch) | |
tree | ffe3383c7ed5f0bc0fb710f1e88fd2245bb98ff7 /erts/emulator/sys | |
parent | 7d21afe83b40d1f9406fc2f54de52bc8aa392138 (diff) | |
download | otp-d73d6da23e77d5b7a803209319ad2709f03505a9.tar.gz otp-d73d6da23e77d5b7a803209319ad2709f03505a9.tar.bz2 otp-d73d6da23e77d5b7a803209319ad2709f03505a9.zip |
Fix flush of fd-driver on Windows
Diffstat (limited to 'erts/emulator/sys')
-rwxr-xr-x | erts/emulator/sys/win32/sys.c | 3 |
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); } |