repo.or.cz
/
linux
/
fpc-iii.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge tag 'block-5.11-2021-01-16' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git]
/
tools
/
build
/
feature
/
test-pthread-attr-setaffinity-np.c
blob
38c71131c452e89699bee47d83bffa5f9145ec2b
1
// SPDX-License-Identifier: GPL-2.0
2
#include <stdint.h>
3
#include <pthread.h>
4
#include <sched.h>
5
6
int
main
(
void
)
7
{
8
int
ret
=
0
;
9
pthread_attr_t thread_attr
;
10
cpu_set_t cs
;
11
12
pthread_attr_init
(&
thread_attr
);
13
CPU_ZERO
(&
cs
);
14
15
ret
=
pthread_attr_setaffinity_np
(&
thread_attr
,
sizeof
(
cs
), &
cs
);
16
17
return
ret
;
18
}