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

Side by Side Diff: src/vm/thread_windows.h

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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 | « src/vm/thread_posix.cc ('k') | src/vm/thread_windows.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) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #ifndef SRC_VM_THREAD_WINDOWS_H_ 5 #ifndef SRC_VM_THREAD_WINDOWS_H_
6 #define SRC_VM_THREAD_WINDOWS_H_ 6 #define SRC_VM_THREAD_WINDOWS_H_
7 7
8 #ifndef SRC_VM_THREAD_H_ 8 #ifndef SRC_VM_THREAD_H_
9 #error "Don't include thread_windows.h directly, include thread.h." 9 #error "Don't include thread_windows.h directly, include thread.h."
10 #endif 10 #endif
11 11
12 #include <Windows.h> 12 #include <Windows.h>
13 13
14 #include "src/shared/assert.h" 14 #include "src/shared/assert.h"
15 15
16 namespace fletch { 16 namespace dartino {
17 17
18 // A ThreadIdentifier represents a thread identifier for a thread. 18 // A ThreadIdentifier represents a thread identifier for a thread.
19 // The ThreadIdentifier does not own the underlying OS handle. 19 // The ThreadIdentifier does not own the underlying OS handle.
20 // Thread handles can be used for referring to threads and testing equality. 20 // Thread handles can be used for referring to threads and testing equality.
21 class ThreadIdentifier { 21 class ThreadIdentifier {
22 public: 22 public:
23 ThreadIdentifier() : thread_(GetCurrentThread()) {} 23 ThreadIdentifier() : thread_(GetCurrentThread()) {}
24 24
25 // Test for thread running. 25 // Test for thread running.
26 bool IsSelf() const { return GetCurrentThreadId() == GetThreadId(thread_); } 26 bool IsSelf() const { return GetCurrentThreadId() == GetThreadId(thread_); }
(...skipping 12 matching lines...) Expand all
39 } 39 }
40 40
41 private: 41 private:
42 friend class Thread; 42 friend class Thread;
43 43
44 explicit ThreadIdentifier(HANDLE thread) : thread_(thread) {} 44 explicit ThreadIdentifier(HANDLE thread) : thread_(thread) {}
45 45
46 HANDLE thread_; 46 HANDLE thread_;
47 }; 47 };
48 48
49 } // namespace fletch 49 } // namespace dartino
50 50
51 #endif // SRC_VM_THREAD_WINDOWS_H_ 51 #endif // SRC_VM_THREAD_WINDOWS_H_
OLDNEW
« no previous file with comments | « src/vm/thread_posix.cc ('k') | src/vm/thread_windows.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698