From d1a9c84a6b375cb25a8b7475957130e364b41753 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 2 Jul 2018 22:36:08 -0700 Subject: fixes #572 Several locking errors found fixes #573 atomic flags could help This introduces a new atomic flag, and reduces some of the global locking. The lock refactoring work is not yet complete, but this is a positive step forward, and should help with certain things. While here we also fixed a compile warning due to incorrect types. --- src/platform/windows/win_impl.h | 4 ++++ 1 file changed, 4 insertions(+) (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 0bd12b24..73dc3660 100644 --- a/src/platform/windows/win_impl.h +++ b/src/platform/windows/win_impl.h @@ -48,6 +48,10 @@ struct nni_plat_cv { PSRWLOCK srl; }; +struct nni_atomic_flag { + unsigned f; +}; + // nni_win_event is used with io completion ports. This allows us to get // to a specific completion callback without requiring the poller (in the // completion port) to know anything about the event itself. We also use -- cgit v1.2.3-70-g09d2