diff options
| author | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2025-07-05 00:00:00 +0000 |
|---|---|---|
| committer | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2025-07-05 19:27:33 +0500 |
| commit | 395149956d696e6e3099d8b76d797437f94a6942 (patch) | |
| tree | 6ed5013a637078ae2dfdc4acf1ad93bf29cea356 /C/LzFindMt.c | |
| parent | e5431fa6f5505e385c6f9367260717e9c47dc2ee (diff) | |
| download | 7zip-25.00.tar.gz 7zip-25.00.tar.bz2 7zip-25.00.zip | |
25.0025.00
Diffstat (limited to 'C/LzFindMt.c')
| -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 |
