Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2010 11:58:42 +0000 (UTC)
From:      David Xu <davidxu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r212552 - head/lib/libthr/thread
Message-ID:  <201009131158.o8DBwgSO096397@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davidxu
Date: Mon Sep 13 11:58:42 2010
New Revision: 212552
URL: http://svn.freebsd.org/changeset/base/212552

Log:
  Don't compare thread pointers again.

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 11:57:46 2010	(r212551)
+++ head/lib/libthr/thread/thr_affinity.c	Mon Sep 13 11:58:42 2010	(r212552)
@@ -70,13 +70,13 @@ _pthread_getaffinity_np(pthread_t td, si
 
 	if (td == curthread) {
 		error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID,
-			(td == curthread) ? -1 : tid, cpusetsize, cpusetp);
+			-1, cpusetsize, cpusetp);
 		if (error == -1)
 			error = errno;
 	} else if ((error = _thr_find_thread(curthread, td, 0)) == 0) {
 		tid = TID(td);
-		error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID,
-			(td == curthread) ? -1 : tid, cpusetsize, cpusetp);
+		error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, tid,
+			    cpusetsize, cpusetp);
 		if (error == -1)
 			error = errno;
 		THR_THREAD_UNLOCK(curthread, td);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009131158.o8DBwgSO096397>