diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-08-04 17:17:42 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-08-04 21:20:00 -0700 |
| commit | dc334d7193a2a0bc0194221b853a37e1be7f5b9a (patch) | |
| tree | 1eebf2773745a3a25e8a071fbe4f51cd5490d4e4 /src/platform/windows/win_impl.h | |
| parent | 6887900ae033add30ee0151b72abe927c5239588 (diff) | |
| download | nng-dc334d7193a2a0bc0194221b853a37e1be7f5b9a.tar.gz nng-dc334d7193a2a0bc0194221b853a37e1be7f5b9a.tar.bz2 nng-dc334d7193a2a0bc0194221b853a37e1be7f5b9a.zip | |
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.
Diffstat (limited to 'src/platform/windows/win_impl.h')
| -rw-r--r-- | src/platform/windows/win_impl.h | 9 |
1 files changed, 3 insertions, 6 deletions
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 <garrett@damore.org> +// Copyright 2017 Capitar IT Group BV <info@capitar.com> // // 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 *); |
