summaryrefslogtreecommitdiffstats
path: root/remoting/base
diff options
context:
space:
mode:
authorepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-21 03:15:49 +0000
committerepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-21 03:15:49 +0000
commita688c89c25dd5c966b112cd5dd8ef084698d363e (patch)
tree5f12b910f6f70d93b28a0ca96e7a51bbaee0cdd1 /remoting/base
parentf3988515eb7595a7553ad76004847d88356bb8bc (diff)
downloadchromium_src-a688c89c25dd5c966b112cd5dd8ef084698d363e.zip
chromium_src-a688c89c25dd5c966b112cd5dd8ef084698d363e.tar.gz
chromium_src-a688c89c25dd5c966b112cd5dd8ef084698d363e.tar.bz2
base: Support setting thread priorities generically.
This patch supports setting priorities across platforms at the PlatformThread level, by stashing thread id into the thread handle on linux/android. Since this adds more platform specific code, and #ifdefs were starting to get unwieldy, all platform specific code is moved into _platform.cc files, with the exception of the 'default' implementation, which stay in _posix. BUG=170549 Review URL: https://chromiumcodereview.appspot.com/12741012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/base')
-rw-r--r--remoting/base/auto_thread.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/remoting/base/auto_thread.cc b/remoting/base/auto_thread.cc
index d79af49..9890bc3 100644
--- a/remoting/base/auto_thread.cc
+++ b/remoting/base/auto_thread.cc
@@ -92,7 +92,7 @@ AutoThread::AutoThread(const char* name)
#if defined(OS_WIN)
com_init_type_(COM_INIT_NONE),
#endif
- thread_(0),
+ thread_(),
name_(name),
was_quit_properly_(false) {
}
@@ -102,7 +102,7 @@ AutoThread::AutoThread(const char* name, AutoThreadTaskRunner* joiner)
#if defined(OS_WIN)
com_init_type_(COM_INIT_NONE),
#endif
- thread_(0),
+ thread_(),
name_(name),
was_quit_properly_(false),
joiner_(joiner) {
@@ -112,14 +112,14 @@ AutoThread::~AutoThread() {
DCHECK(!startup_data_);
// Wait for the thread to exit.
- if (thread_) {
+ if (!thread_.is_null()) {
base::PlatformThread::Join(thread_);
}
}
scoped_refptr<AutoThreadTaskRunner> AutoThread::StartWithType(
base::MessageLoop::Type type) {
- DCHECK(!thread_);
+ DCHECK(thread_.is_null());
#if defined(OS_WIN)
DCHECK(com_init_type_ != COM_INIT_STA || type == base::MessageLoop::TYPE_UI);
#endif