diff options
Diffstat (limited to '')
-rw-r--r-- | C/LzFindMt.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/C/LzFindMt.c b/C/LzFindMt.c index ac9d59d..25fcc46 100644 --- a/C/LzFindMt.c +++ b/C/LzFindMt.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* LzFindMt.c -- multithreaded Match finder for LZ algorithms | 1 | /* LzFindMt.c -- multithreaded Match finder for LZ algorithms |
2 | 2024-01-22 : Igor Pavlov : Public domain */ | 2 | : Igor Pavlov : Public domain */ |
3 | 3 | ||
4 | #include "Precomp.h" | 4 | #include "Precomp.h" |
5 | 5 | ||
@@ -82,6 +82,8 @@ extern UInt64 g_NumIters_Bytes; | |||
82 | Z7_NO_INLINE | 82 | Z7_NO_INLINE |
83 | static void MtSync_Construct(CMtSync *p) | 83 | static void MtSync_Construct(CMtSync *p) |
84 | { | 84 | { |
85 | p->affinityGroup = -1; | ||
86 | p->affinityInGroup = 0; | ||
85 | p->affinity = 0; | 87 | p->affinity = 0; |
86 | p->wasCreated = False; | 88 | p->wasCreated = False; |
87 | p->csWasInitialized = False; | 89 | p->csWasInitialized = False; |
@@ -259,6 +261,12 @@ static WRes MtSync_Create_WRes(CMtSync *p, THREAD_FUNC_TYPE startAddress, void * | |||
259 | // return ERROR_TOO_MANY_POSTS; // for debug | 261 | // return ERROR_TOO_MANY_POSTS; // for debug |
260 | // return EINVAL; // for debug | 262 | // return EINVAL; // for debug |
261 | 263 | ||
264 | #ifdef _WIN32 | ||
265 | if (p->affinityGroup >= 0) | ||
266 | wres = Thread_Create_With_Group(&p->thread, startAddress, obj, | ||
267 | (unsigned)(UInt32)p->affinityGroup, (CAffinityMask)p->affinityInGroup); | ||
268 | else | ||
269 | #endif | ||
262 | if (p->affinity != 0) | 270 | if (p->affinity != 0) |
263 | wres = Thread_Create_With_Affinity(&p->thread, startAddress, obj, (CAffinityMask)p->affinity); | 271 | wres = Thread_Create_With_Affinity(&p->thread, startAddress, obj, (CAffinityMask)p->affinity); |
264 | else | 272 | else |