Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sched: sched: Remove sched_lock/unlock from nxsched_set_affinity() #2726

Merged
merged 1 commit into from Jan 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions sched/sched/sched_setaffinity.c
Expand Up @@ -80,7 +80,6 @@ int nxsched_set_affinity(pid_t pid, size_t cpusetsize,

/* Verify that the PID corresponds to a real task */

sched_lock();
if (!pid)
{
tcb = this_task();
Expand All @@ -93,7 +92,7 @@ int nxsched_set_affinity(pid_t pid, size_t cpusetsize,
if (tcb == NULL)
{
ret = -ESRCH;
goto errout_with_lock;
goto errout;
}

/* Don't permit changing the affinity mask of any task locked to a CPU
Expand Down Expand Up @@ -143,8 +142,7 @@ int nxsched_set_affinity(pid_t pid, size_t cpusetsize,
errout_with_csection:
leave_critical_section(flags);

errout_with_lock:
sched_unlock();
errout:
return ret;
}

Expand Down