From dc334d7193a2a0bc0194221b853a37e1be7f5b9a Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 4 Aug 2017 17:17:42 -0700 Subject: Refactor AIO logic to close numerous races and reduce complexity. This passes valgrind 100% clean for both helgrind and deep leak checks. This represents a complete rethink of how the AIOs work, and much simpler synchronization; the provider API is a bit simpler to boot, as a number of failure modes have been simply eliminated. While here a few other minor bugs were squashed. --- src/platform/windows/win_impl.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/platform/windows/win_impl.h') diff --git a/src/platform/windows/win_impl.h b/src/platform/windows/win_impl.h index a77fcf0b..a2700485 100644 --- a/src/platform/windows/win_impl.h +++ b/src/platform/windows/win_impl.h @@ -1,5 +1,6 @@ // // Copyright 2017 Garrett D'Amore +// Copyright 2017 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -65,17 +66,13 @@ struct nni_win_event { nni_aio * aio; nni_mtx mtx; nni_cv cv; - int flags; + unsigned run : 1; + unsigned fini : 1; int count; int status; nni_win_event_ops ops; }; -enum nni_win_event_flags { - NNI_WIN_EVENT_RUNNING = 1, - NNI_WIN_EVENT_ABORT = 2, -}; - extern int nni_win_error(int); extern int nni_win_event_init(nni_win_event *, nni_win_event_ops *, void *); -- cgit v1.2.3-70-g09d2