Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1068)

Unified Diff: src/utils/SkThreadUtils_pthread_mach.cpp

Issue 1408213005: Remove SkThread::setProcessorAffinity() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: gAdds Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/SkThreadUtils_pthread_linux.cpp ('k') | src/utils/SkThreadUtils_pthread_other.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkThreadUtils_pthread_mach.cpp
diff --git a/src/utils/SkThreadUtils_pthread_mach.cpp b/src/utils/SkThreadUtils_pthread_mach.cpp
deleted file mode 100644
index 0f6e263906dde9abd72a070073c754820629a1ac..0000000000000000000000000000000000000000
--- a/src/utils/SkThreadUtils_pthread_mach.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkThreadUtils.h"
-#include "SkThreadUtils_pthread.h"
-
-#include <mach/mach.h>
-#include <mach/thread_policy.h>
-#include <pthread.h>
-
-bool SkThread::setProcessorAffinity(unsigned int processor) {
- SkThread_PThreadData* pthreadData = static_cast<SkThread_PThreadData*>(fData);
- if (!pthreadData->fValidPThread) {
- return false;
- }
-
- mach_port_t tid = pthread_mach_thread_np(pthreadData->fPThread);
-
- thread_affinity_policy_data_t policy;
- policy.affinity_tag = processor;
-
- return 0 == thread_policy_set(tid,
- THREAD_AFFINITY_POLICY,
- (thread_policy_t) &policy,
- THREAD_AFFINITY_POLICY_COUNT);
-}
« no previous file with comments | « src/utils/SkThreadUtils_pthread_linux.cpp ('k') | src/utils/SkThreadUtils_pthread_other.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698