PS_DEAD state needs not be checked because _thr_find_thread() has already

checked it.
This commit is contained in:
davidxu 2010-09-13 07:18:00 +00:00
parent c517eaecea
commit 71456632de

View File

@ -51,10 +51,6 @@ _pthread_setaffinity_np(pthread_t td, size_t cpusetsize, const cpuset_t *cpusetp
if (error == -1)
error = errno;
} else if ((error = _thr_find_thread(curthread, td, 0)) == 0) {
if (td->state == PS_DEAD) {
THR_THREAD_UNLOCK(curthread, td);
return (EINVAL);
}
tid = TID(td);
error = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, tid,
cpusetsize, cpusetp);