sched_get/setaffinity(3): pid 0 should designate current process
while FreeBSD' native sched_get/setaffinity use pid -1 for this. PR: 260487 MFC after: 1 week
This commit is contained in:
parent
8ea3921f93
commit
caacda7a3e
@ -32,6 +32,6 @@
|
||||
int
|
||||
sched_getaffinity(pid_t pid, size_t cpusetsz, cpuset_t *cpuset)
|
||||
{
|
||||
return (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, pid,
|
||||
cpusetsz, cpuset));
|
||||
return (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID,
|
||||
pid == 0 ? -1 : pid, cpusetsz, cpuset));
|
||||
}
|
||||
|
@ -32,6 +32,6 @@
|
||||
int
|
||||
sched_setaffinity(pid_t pid, size_t cpusetsz, const cpuset_t *cpuset)
|
||||
{
|
||||
return (cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, pid,
|
||||
cpusetsz, cpuset));
|
||||
return (cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID,
|
||||
pid == 0 ? -1 : pid, cpusetsz, cpuset));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user