Code Review
/
kvmfornfv.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
history
|
raw
|
HEAD
Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git]
/
kernel
/
tools
/
build
/
feature
/
test-pthread-attr-setaffinity-np.c
1
#include <stdint.h>
2
#include <pthread.h>
3
#include <sched.h>
4
5
int main(void)
6
{
7
int ret = 0;
8
pthread_attr_t thread_attr;
9
cpu_set_t cs;
10
11
pthread_attr_init(&thread_attr);
12
CPU_ZERO(&cs);
13
14
ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cs), &cs);
15
16
return ret;
17
}