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