VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/lzma/Threads.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/lzma/Threads.h')
-rw-r--r--src/Common/lzma/Threads.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/Common/lzma/Threads.h b/src/Common/lzma/Threads.h
index 4028464a..c1484a27 100644
--- a/src/Common/lzma/Threads.h
+++ b/src/Common/lzma/Threads.h
@@ -1,3 +1,3 @@
/* Threads.h -- multithreading library
-2023-04-02 : Igor Pavlov : Public domain */
+2024-03-28 : Igor Pavlov : Public domain */
@@ -11,2 +11,5 @@
+#include "Compiler.h"
+
+// #define Z7_AFFINITY_DISABLE
#if defined(__linux__)
@@ -16,3 +19,9 @@
// #pragma message(" ==== Z7_AFFINITY_SUPPORTED")
-// #define _GNU_SOURCE
+#if !defined(_GNU_SOURCE)
+// #pragma message(" ==== _GNU_SOURCE set")
+// we need _GNU_SOURCE for cpu_set_t, if we compile for MUSL
+Z7_DIAGNOSTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER
+#define _GNU_SOURCE
+Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER
+#endif
#endif
@@ -175,3 +184,3 @@ WRes CriticalSection_Init(CCriticalSection *p);
-typedef struct _CEvent
+typedef struct
{
@@ -201,3 +210,3 @@ WRes Event_Close(CEvent *p);
-typedef struct _CSemaphore
+typedef struct
{
@@ -221,3 +230,3 @@ WRes Semaphore_Close(CSemaphore *p);
-typedef struct _CCriticalSection
+typedef struct
{
@@ -232,2 +241,3 @@ void CriticalSection_Leave(CCriticalSection *cs);
LONG InterlockedIncrement(LONG volatile *addend);
+LONG InterlockedDecrement(LONG volatile *addend);