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

Side by Side Diff: runtime/vm/os_thread.h

Issue 1515553003: VM: Fix deadlock in time line recording. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | « no previous file | runtime/vm/os_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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_OS_THREAD_H_ 5 #ifndef VM_OS_THREAD_H_
6 #define VM_OS_THREAD_H_ 6 #define VM_OS_THREAD_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // Returns the current thread and moves forward. 240 // Returns the current thread and moves forward.
241 OSThread* Next(); 241 OSThread* Next();
242 242
243 private: 243 private:
244 OSThread* next_; 244 OSThread* next_;
245 }; 245 };
246 246
247 247
248 class Mutex { 248 class Mutex {
249 public: 249 public:
250 Mutex(); 250 explicit Mutex(bool recursive = false);
Ivan Posva 2015/12/09 16:34:57 The class Mutex is defined to not ever be recursiv
Florian Schneider 2015/12/10 14:44:21 What would break otherwise? I didn't see any tests
251 ~Mutex(); 251 ~Mutex();
252 252
253 void Lock(); 253 void Lock();
254 bool TryLock(); 254 bool TryLock();
255 void Unlock(); 255 void Unlock();
256 256
257 #if defined(DEBUG) 257 #if defined(DEBUG)
258 bool IsOwnedByCurrentThread() const { 258 bool IsOwnedByCurrentThread() const {
259 return owner_ == OSThread::GetCurrentThreadId(); 259 return owner_ == OSThread::GetCurrentThreadId();
260 } 260 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 #endif // defined(DEBUG) 316 #endif // defined(DEBUG)
317 317
318 DISALLOW_COPY_AND_ASSIGN(Monitor); 318 DISALLOW_COPY_AND_ASSIGN(Monitor);
319 }; 319 };
320 320
321 321
322 } // namespace dart 322 } // namespace dart
323 323
324 324
325 #endif // VM_OS_THREAD_H_ 325 #endif // VM_OS_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/os_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698