From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 11:58:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C34D5106564A; Mon, 13 Sep 2010 11:58:42 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B18F28FC0A; Mon, 13 Sep 2010 11:58:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DBwgwh096399; Mon, 13 Sep 2010 11:58:42 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DBwgSO096397; Mon, 13 Sep 2010 11:58:42 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201009131158.o8DBwgSO096397@svn.freebsd.org> From: David Xu Date: Mon, 13 Sep 2010 11:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212552 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 11:58:42 -0000 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);