diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-21 03:57:12 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-21 03:57:12 +0000 |
commit | 5686b177b4c9de40440ccd60546529b8a4522cd1 (patch) | |
tree | 5724cad21e7ee040c06bf3a68c67e55237fbf404 /media/audio/audio_device_thread.cc | |
parent | 41cea7ac73afdc41854ddab97f8f1b00541e603d (diff) | |
download | chromium_src-5686b177b4c9de40440ccd60546529b8a4522cd1.zip chromium_src-5686b177b4c9de40440ccd60546529b8a4522cd1.tar.gz chromium_src-5686b177b4c9de40440ccd60546529b8a4522cd1.tar.bz2 |
Revert 201202 "base: Support setting thread priorities generically."
Broke "sizes" by adding may static initializers.
> 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
TBR=epenner@chromium.org
Review URL: https://codereview.chromium.org/15311004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201215 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/audio_device_thread.cc')
-rw-r--r-- | media/audio/audio_device_thread.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/media/audio/audio_device_thread.cc b/media/audio/audio_device_thread.cc index f73ede8..7583c9e 100644 --- a/media/audio/audio_device_thread.cc +++ b/media/audio/audio_device_thread.cc @@ -101,18 +101,18 @@ AudioDeviceThread::Thread::Thread(AudioDeviceThread::Callback* callback, } AudioDeviceThread::Thread::~Thread() { - DCHECK(thread_.is_null()); + DCHECK_EQ(thread_, base::kNullThreadHandle) << "Stop wasn't called"; } void AudioDeviceThread::Thread::Start() { base::AutoLock auto_lock(callback_lock_); - DCHECK(thread_.is_null()); + DCHECK_EQ(thread_, base::kNullThreadHandle); // This reference will be released when the thread exists. AddRef(); PlatformThread::CreateWithPriority(0, this, &thread_, base::kThreadPriority_RealtimeAudio); - CHECK(!thread_.is_null()); + CHECK(thread_ != base::kNullThreadHandle); } void AudioDeviceThread::Thread::Stop(base::MessageLoop* loop_for_join) { @@ -126,7 +126,7 @@ void AudioDeviceThread::Thread::Stop(base::MessageLoop* loop_for_join) { std::swap(thread, thread_); } - if (!thread.is_null()) { + if (thread != base::kNullThreadHandle) { if (loop_for_join) { loop_for_join->PostTask(FROM_HERE, base::Bind(&base::PlatformThread::Join, thread)); |