summaryrefslogtreecommitdiff
path: root/lib/sqfs/data_writer/internal.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-12-08 16:47:05 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-12-08 16:48:59 +0100
commit6d7db2bd7ce39621f27f9f669690ab606ddc1787 (patch)
tree135d52fa163128e5836c0836cfa8e4da51280e71 /lib/sqfs/data_writer/internal.h
parent78b5d43a0c03dafa711a19310db6f4bd8f100b55 (diff)
Replace SetEvent synchronization with condition variables
It's cleaner, more stable and works pretty much the same way as the pthread version. The downside is that the minimum target for the library is now Windows Vista, or Server 2008. But both are over a decade old anyway, so this shouldn't be an issue. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/data_writer/internal.h')
-rw-r--r--lib/sqfs/data_writer/internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqfs/data_writer/internal.h b/lib/sqfs/data_writer/internal.h
index 312922b..ea8fe79 100644
--- a/lib/sqfs/data_writer/internal.h
+++ b/lib/sqfs/data_writer/internal.h
@@ -58,8 +58,8 @@ struct sqfs_data_writer_t {
pthread_cond_t done_cond;
#elif defined(_WIN32) || defined(__WINDOWS__)
CRITICAL_SECTION mtx;
- HANDLE queue_cond;
- HANDLE done_cond;
+ CONDITION_VARIABLE queue_cond;
+ CONDITION_VARIABLE done_cond;
#endif
/* needs rw access by worker and main thread */