diff options
Diffstat (limited to '')
-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 | ||