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

Side by Side Diff: webrtc/base/thread.h

Issue 2784483002: Add Darwin thread.h implementation. (Closed)
Patch Set: Make ThreadInit private to rtc::Thread Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « webrtc/base/scoped_autorelease_pool.mm ('k') | webrtc/base/thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 void SafeWrapCurrent(); 231 void SafeWrapCurrent();
232 232
233 // Blocks the calling thread until this thread has terminated. 233 // Blocks the calling thread until this thread has terminated.
234 void Join(); 234 void Join();
235 235
236 static void AssertBlockingIsAllowedOnCurrentThread(); 236 static void AssertBlockingIsAllowedOnCurrentThread();
237 237
238 friend class ScopedDisallowBlockingCalls; 238 friend class ScopedDisallowBlockingCalls;
239 239
240 private: 240 private:
241 struct ThreadInit {
242 Thread* thread;
243 Runnable* runnable;
244 };
245
241 #if defined(WEBRTC_WIN) 246 #if defined(WEBRTC_WIN)
242 static DWORD WINAPI PreRun(LPVOID context); 247 static DWORD WINAPI PreRun(LPVOID context);
243 #else 248 #else
244 static void *PreRun(void *pv); 249 static void *PreRun(void *pv);
245 #endif 250 #endif
246 251
247 // ThreadManager calls this instead WrapCurrent() because 252 // ThreadManager calls this instead WrapCurrent() because
248 // ThreadManager::Instance() cannot be used while ThreadManager is 253 // ThreadManager::Instance() cannot be used while ThreadManager is
249 // being created. 254 // being created.
250 // The method tries to get synchronization rights of the thread on Windows if 255 // The method tries to get synchronization rights of the thread on Windows if
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 334
330 private: 335 private:
331 SocketServer* old_ss_; 336 SocketServer* old_ss_;
332 337
333 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SocketServerScope); 338 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SocketServerScope);
334 }; 339 };
335 340
336 } // namespace rtc 341 } // namespace rtc
337 342
338 #endif // WEBRTC_BASE_THREAD_H_ 343 #endif // WEBRTC_BASE_THREAD_H_
OLDNEW
« no previous file with comments | « webrtc/base/scoped_autorelease_pool.mm ('k') | webrtc/base/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698