diff --git a/sched/sched/sched_setaffinity.c b/sched/sched/sched_setaffinity.c index aa3b4af786b..2c0173188f6 100644 --- a/sched/sched/sched_setaffinity.c +++ b/sched/sched/sched_setaffinity.c @@ -126,8 +126,8 @@ int nxsched_set_affinity(pid_t pid, size_t cpusetsize, * First... is the task in an assigned task list? */ - if (tcb->task_state >= FIRST_ASSIGNED_STATE && - tcb->task_state <= LAST_ASSIGNED_STATE) + if (tcb->task_state >= FIRST_READY_TO_RUN_STATE && + tcb->task_state <= LAST_READY_TO_RUN_STATE) { /* Yes... is the CPU associated with the assigned task in the new * affinity mask?