Commit | Line | Data |
---|---|---|
459a3df7 VG |
1 | #include <stdint.h> |
2 | #include <pthread.h> | |
543d976f | 3 | #include <sched.h> |
459a3df7 VG |
4 | |
5 | int main(void) | |
6 | { | |
7 | int ret = 0; | |
8 | pthread_attr_t thread_attr; | |
95a09cfa | 9 | cpu_set_t cs; |
459a3df7 VG |
10 | |
11 | pthread_attr_init(&thread_attr); | |
543d976f AH |
12 | CPU_ZERO(&cs); |
13 | ||
95a09cfa | 14 | ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cs), &cs); |
459a3df7 VG |
15 | |
16 | return ret; | |
17 | } |