summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-09-13 11:58:42 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-09-13 11:58:42 +0000
commitb79ad9b341eede22fd26f3579893e3fd57160154 (patch)
tree480c09a2a6d13b9aa2d815b7ecb29b63a35f856c /lib/libthr/thread
parent95869dd2a29cb875ae3096aa5c4d41e5304c3b5b (diff)
downloadFreeBSD-src-b79ad9b341eede22fd26f3579893e3fd57160154.zip
FreeBSD-src-b79ad9b341eede22fd26f3579893e3fd57160154.tar.gz
Don't compare thread pointers again.
Diffstat (limited to 'lib/libthr/thread')
-rw-r--r--lib/libthr/thread/thr_affinity.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_affinity.c b/lib/libthr/thread/thr_affinity.c
index 3f93224..7e9b0f9 100644
--- a/lib/libthr/thread/thr_affinity.c
+++ b/lib/libthr/thread/thr_affinity.c
@@ -70,13 +70,13 @@ _pthread_getaffinity_np(pthread_t td, size_t cpusetsize, cpuset_t *cpusetp)
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);
OpenPOWER on IntegriCloud