b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | --- a/C/Threads.c |
| 2 | +++ b/C/Threads.c |
| 3 | @@ -265,7 +265,7 @@ WRes Thread_Create_With_CpuSet(CThread * |
| 4 | */
|
| 5 |
|
| 6 | // ret2 =
|
| 7 | - pthread_attr_setaffinity_np(&attr, sizeof(*cpuSet), cpuSet);
|
| 8 | + //pthread_attr_setaffinity_np(&attr, sizeof(*cpuSet), cpuSet);
|
| 9 | // if (ret2) ret = ret2;
|
| 10 | #endif
|
| 11 | }
|
| 12 | @@ -275,14 +275,12 @@ WRes Thread_Create_With_CpuSet(CThread * |
| 13 | if (!ret)
|
| 14 | {
|
| 15 | p->_created = 1;
|
| 16 | - /*
|
| 17 | if (cpuSet)
|
| 18 | {
|
| 19 | // ret2 =
|
| 20 | pthread_setaffinity_np(p->_tid, sizeof(*cpuSet), cpuSet);
|
| 21 | // if (ret2) ret = ret2;
|
| 22 | }
|
| 23 | - */
|
| 24 | }
|
| 25 | }
|
| 26 | // ret2 =
|
| 27 | --- a/C/Threads.h |
| 28 | +++ b/C/Threads.h |
| 29 | @@ -29,6 +29,7 @@ Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_ |
| 30 | #endif
|
| 31 |
|
| 32 | #include <pthread.h>
|
| 33 | +#include <sched.h>
|
| 34 |
|
| 35 | #endif
|
| 36 |
|