User Tools

Site Tools


realtime:documentation:howto:tools:cpu-partitioning:sched_getsetaffinity

This is an old revision of the document!


sched_[get|set]affinity

Linux provides a couple of system calls to set the and get the CPU affinity of the current process, this are:

int sched_setaffinity(pid_t pid, size_t cpusetsize,
                      const cpu_set_t *mask);
 
int sched_getaffinity(pid_t pid, size_t cpusetsize,
                      cpu_set_t *mask);

The official description on these system calls and data structures used, can be obtain from the man page executing

$ man sched_setaffinity
realtime/documentation/howto/tools/cpu-partitioning/sched_getsetaffinity.1500307604.txt.gz · Last modified: 2017/07/17 16:06 by anna-maria