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/Threads.h | |
| 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/Threads.h')
| -rw-r--r-- | C/Threads.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/C/Threads.h b/C/Threads.h index c1484a2..be12e6e 100644 --- a/C/Threads.h +++ b/C/Threads.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Threads.h -- multithreading library | 1 | /* Threads.h -- multithreading library |
| 2 | 2024-03-28 : Igor Pavlov : Public domain */ | 2 | : Igor Pavlov : Public domain */ |
| 3 | 3 | ||
| 4 | #ifndef ZIP7_INC_THREADS_H | 4 | #ifndef ZIP7_INC_THREADS_H |
| 5 | #define ZIP7_INC_THREADS_H | 5 | #define ZIP7_INC_THREADS_H |
| @@ -140,12 +140,22 @@ WRes Thread_Create_With_Affinity(CThread *p, THREAD_FUNC_TYPE func, LPVOID param | |||
| 140 | WRes Thread_Wait_Close(CThread *p); | 140 | WRes Thread_Wait_Close(CThread *p); |
| 141 | 141 | ||
| 142 | #ifdef _WIN32 | 142 | #ifdef _WIN32 |
| 143 | WRes Thread_Create_With_Group(CThread *p, THREAD_FUNC_TYPE func, LPVOID param, unsigned group, CAffinityMask affinityMask); | ||
| 143 | #define Thread_Create_With_CpuSet(p, func, param, cs) \ | 144 | #define Thread_Create_With_CpuSet(p, func, param, cs) \ |
| 144 | Thread_Create_With_Affinity(p, func, param, *cs) | 145 | Thread_Create_With_Affinity(p, func, param, *cs) |
| 145 | #else | 146 | #else |
| 146 | WRes Thread_Create_With_CpuSet(CThread *p, THREAD_FUNC_TYPE func, LPVOID param, const CCpuSet *cpuSet); | 147 | WRes Thread_Create_With_CpuSet(CThread *p, THREAD_FUNC_TYPE func, LPVOID param, const CCpuSet *cpuSet); |
| 147 | #endif | 148 | #endif |
| 148 | 149 | ||
| 150 | typedef struct | ||
| 151 | { | ||
| 152 | unsigned NumGroups; | ||
| 153 | unsigned NextGroup; | ||
| 154 | } CThreadNextGroup; | ||
| 155 | |||
| 156 | void ThreadNextGroup_Init(CThreadNextGroup *p, unsigned numGroups, unsigned startGroup); | ||
| 157 | unsigned ThreadNextGroup_GetNext(CThreadNextGroup *p); | ||
| 158 | |||
| 149 | 159 | ||
| 150 | #ifdef _WIN32 | 160 | #ifdef _WIN32 |
| 151 | 161 | ||
