svn commit: r212539 - head/lib/libthr/thread

David Xu davidxu at FreeBSD.org
Mon Sep 13 07:18:01 UTC 2010


Author: davidxu
Date: Mon Sep 13 07:18:00 2010
New Revision: 212539
URL: http://svn.freebsd.org/changeset/base/212539

Log:
  PS_DEAD state needs not be checked because _thr_find_thread() has already
  checked it.

Modified:
  head/lib/libthr/thread/thr_affinity.c

Modified: head/lib/libthr/thread/thr_affinity.c
==============================================================================
--- head/lib/libthr/thread/thr_affinity.c	Mon Sep 13 07:16:48 2010	(r212538)
+++ head/lib/libthr/thread/thr_affinity.c	Mon Sep 13 07:18:00 2010	(r212539)
@@ -51,10 +51,6 @@ _pthread_setaffinity_np(pthread_t td, si
 		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);


More information about the svn-src-head mailing list