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

Unified Diff: media/audio/cross_process_notification_win.cc

Issue 12741012: base: Support setting thread priorities generically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove static initializers. Created 7 years, 7 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 | « media/audio/audio_device_thread.cc ('k') | media/filters/video_renderer_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/cross_process_notification_win.cc
diff --git a/media/audio/cross_process_notification_win.cc b/media/audio/cross_process_notification_win.cc
index 65e0e43f03487a85f0b919f0feba7af37f2aa434..53bf0f4525eabf5a0477dcb0cf62af47093e60eb 100644
--- a/media/audio/cross_process_notification_win.cc
+++ b/media/audio/cross_process_notification_win.cc
@@ -121,7 +121,9 @@ class ExtraWaitThread : public base::PlatformThread::Delegate {
&events_[MAXIMUM_WAIT_OBJECTS - 2],
count_ - (MAXIMUM_WAIT_OBJECTS - 2),
&thread_signaled_event));
- base::PlatformThread::Create(0, extra_wait_thread.get(), &next_thread);
+ base::PlatformThreadHandle handle;
+ base::PlatformThread::Create(0, extra_wait_thread.get(), &handle);
+ next_thread = handle.platform_handle();
event_count = MAXIMUM_WAIT_OBJECTS;
events[MAXIMUM_WAIT_OBJECTS - 1] = next_thread;
@@ -140,7 +142,7 @@ class ExtraWaitThread : public base::PlatformThread::Delegate {
// so on), we must wait for ours to exit before we can check the
// propagated event offset.
if (next_thread) {
- base::PlatformThread::Join(next_thread);
+ base::PlatformThread::Join(base::PlatformThreadHandle(next_thread));
next_thread = NULL;
}
if (thread_signaled_event != -1)
@@ -156,7 +158,7 @@ class ExtraWaitThread : public base::PlatformThread::Delegate {
}
if (next_thread)
- base::PlatformThread::Join(next_thread);
+ base::PlatformThread::Join(base::PlatformThreadHandle(next_thread));
}
private:
@@ -232,7 +234,7 @@ int CrossProcessNotification::WaitMultiple(const Notifications& notifications,
base::PlatformThread::Create(0, &wait_thread, &thread);
HANDLE events[MAXIMUM_WAIT_OBJECTS];
std::copy(&handles[0], &handles[MAXIMUM_WAIT_OBJECTS - 1], &events[0]);
- events[MAXIMUM_WAIT_OBJECTS - 1] = thread;
+ events[MAXIMUM_WAIT_OBJECTS - 1] = thread.platform_handle();
wait = ::WaitForMultipleObjects(MAXIMUM_WAIT_OBJECTS, &events[0], FALSE,
INFINITE);
wait_failed = wait < WAIT_OBJECT_0 ||
« no previous file with comments | « media/audio/audio_device_thread.cc ('k') | media/filters/video_renderer_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698